Fixed bug in anchors with no content. This involved refactoring the 'implicit sequence' concept (where a map and a sequence start on the same indent, but we read the sequence as more indented since the '-' is visually an indent).

This commit is contained in:
Jesse Beder
2009-08-24 22:56:54 +00:00
parent abe0af76c5
commit a1460169e6
12 changed files with 183 additions and 36 deletions

View File

@@ -75,10 +75,10 @@ namespace YAML
throw ParserException(Mark::null(), ErrorMsg::END_OF_MAP);
Token token = pScanner->peek();
if(token.type != TT_KEY && token.type != TT_VALUE && token.type != TT_BLOCK_END)
if(token.type != TT_KEY && token.type != TT_VALUE && token.type != TT_BLOCK_MAP_END)
throw ParserException(token.mark, ErrorMsg::END_OF_MAP);
if(token.type == TT_BLOCK_END) {
if(token.type == TT_BLOCK_MAP_END) {
pScanner->pop();
break;
}