Moved token enums into Token scope

This commit is contained in:
Jesse Beder
2009-09-05 02:28:11 +00:00
parent 1db573dd30
commit 19673ff01a
8 changed files with 86 additions and 84 deletions

View File

@@ -14,17 +14,17 @@ namespace YAML
void Scanner::SimpleKey::Validate()
{
if(pMapStart)
pMapStart->status = TS_VALID;
pMapStart->status = Token::VALID;
if(pKey)
pKey->status = TS_VALID;
pKey->status = Token::VALID;
}
void Scanner::SimpleKey::Invalidate()
{
if(pMapStart)
pMapStart->status = TS_INVALID;
pMapStart->status = Token::INVALID;
if(pKey)
pKey->status = TS_INVALID;
pKey->status = Token::INVALID;
}
// InsertSimpleKey
@@ -37,12 +37,12 @@ namespace YAML
// first add a map start, if necessary
key.pMapStart = PushIndentTo(INPUT.column(), IndentMarker::MAP);
if(key.pMapStart)
key.pMapStart->status = TS_UNVERIFIED;
key.pMapStart->status = Token::UNVERIFIED;
// then add the (now unverified) key
m_tokens.push(Token(TT_KEY, INPUT.mark()));
m_tokens.push(Token(Token::KEY, INPUT.mark()));
key.pKey = &m_tokens.back();
key.pKey->status = TS_UNVERIFIED;
key.pKey->status = Token::UNVERIFIED;
m_simpleKeys.push(key);
}