mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-10 04:51:17 +00:00
Merged the other-tags branch into the trunk (this wasn't an rX:Y merge, since the branch wasn't branched directly from the head of the trunk)
This commit is contained in:
@@ -276,7 +276,12 @@ namespace YAML
|
||||
} else {
|
||||
bool canBeHandle;
|
||||
token.value = ScanTagHandle(INPUT, canBeHandle);
|
||||
token.data = (token.value.empty() ? Tag::SECONDARY_HANDLE : Tag::PRIMARY_HANDLE);
|
||||
if(!canBeHandle && token.value.empty())
|
||||
token.data = Tag::NON_SPECIFIC;
|
||||
else if(token.value.empty())
|
||||
token.data = Tag::SECONDARY_HANDLE;
|
||||
else
|
||||
token.data = Tag::PRIMARY_HANDLE;
|
||||
|
||||
// is there a suffix?
|
||||
if(canBeHandle && INPUT.peek() == Keys::Tag) {
|
||||
@@ -321,7 +326,7 @@ namespace YAML
|
||||
//if(Exp::IllegalCharInScalar.Matches(INPUT))
|
||||
// throw ParserException(INPUT.mark(), ErrorMsg::CHAR_IN_SCALAR);
|
||||
|
||||
Token token(Token::SCALAR, mark);
|
||||
Token token(Token::PLAIN_SCALAR, mark);
|
||||
token.value = scalar;
|
||||
m_tokens.push(token);
|
||||
}
|
||||
@@ -360,7 +365,7 @@ namespace YAML
|
||||
m_simpleKeyAllowed = false;
|
||||
m_canBeJSONFlow = true;
|
||||
|
||||
Token token(Token::SCALAR, mark);
|
||||
Token token(Token::NON_PLAIN_SCALAR, mark);
|
||||
token.value = scalar;
|
||||
m_tokens.push(token);
|
||||
}
|
||||
@@ -427,7 +432,7 @@ namespace YAML
|
||||
m_simpleKeyAllowed = true;
|
||||
m_canBeJSONFlow = false;
|
||||
|
||||
Token token(Token::SCALAR, mark);
|
||||
Token token(Token::NON_PLAIN_SCALAR, mark);
|
||||
token.value = scalar;
|
||||
m_tokens.push(token);
|
||||
}
|
||||
|
Reference in New Issue
Block a user