Correctly handle `{1}`. Fixes #34

This commit is contained in:
Felix Krause 2017-01-10 12:00:15 +01:00
parent 936df70daa
commit f78c2c5961
1 changed files with 3 additions and 1 deletions

View File

@ -975,7 +975,9 @@ parserState flowAfterObject:
raise c.generateError("Unexpected token (expected ']')") raise c.generateError("Unexpected token (expected ']')")
of fplUnknown, fplSinglePairKey, fplDocument: of fplUnknown, fplSinglePairKey, fplDocument:
internalError("Unexpected level kind: " & $c.level.kind) internalError("Unexpected level kind: " & $c.level.kind)
result = c.leaveFlowLevel(e) # we need the extra state for possibly emitting an additional empty value.
state = leaveFlowMap
return false
of ltComma: of ltComma:
case c.level.kind case c.level.kind
of fplSequence: discard of fplSequence: discard