mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 14:01:25 +12:00
Added some parser exceptions.
This commit is contained in:
parent
901d16a96f
commit
2ccbfeff47
9 changed files with 201 additions and 30 deletions
|
@ -56,10 +56,10 @@ namespace YAML
|
|||
while(1) {
|
||||
Token *pToken = pScanner->PeekNextToken();
|
||||
if(!pToken)
|
||||
break; // TODO: throw?
|
||||
throw SeqEndNotFound();
|
||||
|
||||
if(pToken->type != TT_BLOCK_ENTRY && pToken->type != TT_BLOCK_END)
|
||||
break; // TODO: throw?
|
||||
throw SeqEndNotFound();
|
||||
|
||||
pScanner->PopNextToken();
|
||||
if(pToken->type == TT_BLOCK_END)
|
||||
|
@ -99,7 +99,7 @@ namespace YAML
|
|||
while(1) {
|
||||
Token *pToken = pScanner->PeekNextToken();
|
||||
if(!pToken)
|
||||
break; // TODO: throw?
|
||||
throw SeqEndNotFound();
|
||||
|
||||
// first check for end
|
||||
if(pToken->type == TT_FLOW_SEQ_END) {
|
||||
|
@ -117,7 +117,7 @@ namespace YAML
|
|||
if(pToken->type == TT_FLOW_ENTRY)
|
||||
pScanner->EatNextToken();
|
||||
else if(pToken->type != TT_FLOW_SEQ_END)
|
||||
break; // TODO: throw?
|
||||
throw SeqEndNotFound();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue