mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 14:01:25 +12:00
Moved scalar scanning-related parameters to a struct.
Renamed the valid/possible tokens to a single variable status with enums valid, invalid, and unverified.
This commit is contained in:
parent
ff99f85a6d
commit
5f8252ee6f
10 changed files with 104 additions and 50 deletions
11
scanner.cpp
11
scanner.cpp
|
@ -123,7 +123,7 @@ namespace YAML
|
|||
ScanToNextToken();
|
||||
|
||||
// check the latest simple key
|
||||
ValidateSimpleKey();
|
||||
VerifySimpleKey();
|
||||
|
||||
// maybe need to end some blocks
|
||||
PopIndentTo(INPUT.column);
|
||||
|
@ -213,7 +213,7 @@ namespace YAML
|
|||
INPUT.EatLineBreak();
|
||||
|
||||
// oh yeah, and let's get rid of that simple key
|
||||
ValidateSimpleKey();
|
||||
VerifySimpleKey();
|
||||
|
||||
// new line - we may be able to accept a simple key now
|
||||
if(m_flowLevel == 0)
|
||||
|
@ -272,16 +272,15 @@ namespace YAML
|
|||
if(!m_tokens.empty())
|
||||
pToken = m_tokens.front();
|
||||
|
||||
// ... that's possible
|
||||
// (here's where we clean up the impossible tokens)
|
||||
if(pToken && !pToken->isPossible) {
|
||||
if(pToken && pToken->status == TS_INVALID) {
|
||||
m_tokens.pop();
|
||||
delete pToken;
|
||||
continue;
|
||||
}
|
||||
|
||||
// and valid
|
||||
if(pToken && !pToken->isValid)
|
||||
// on unverified tokens, we just have to wait
|
||||
if(pToken && pToken->status == TS_UNVERIFIED)
|
||||
pToken = 0;
|
||||
|
||||
// then that's what we want
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue