mirror of
https://github.com/status-im/NimYAML.git
synced 2025-01-12 20:44:46 +00:00
Support alias on more positions
This commit is contained in:
parent
433ec3f114
commit
4243226738
@ -472,7 +472,9 @@ proc parse*(parser: YamlSequentialParser, s: Stream): YamlStream =
|
||||
assert level.mode == mImplicitBlockMapKey
|
||||
leaveMoreIndentedLevels()
|
||||
case level.mode
|
||||
of mUnknown, mImplicitBlockMapKey, mBlockSequenceItem:
|
||||
of mUnknown, mImplicitBlockMapKey, mImplicitBlockMapValue,
|
||||
mExplicitBlockMapKey, mExplicitBlockMapValue,
|
||||
mBlockSequenceItem:
|
||||
state = ypBlockAfterAlias
|
||||
else:
|
||||
raiseError("Unexpected alias")
|
||||
@ -504,7 +506,7 @@ proc parse*(parser: YamlSequentialParser, s: Stream): YamlStream =
|
||||
state = ypBlockLineEnd
|
||||
of tLineStart:
|
||||
discard
|
||||
of tColon, tDash, tQuestionmark:
|
||||
of tColon, tDash, tQuestionmark, tOpeningBrace, tOpeningBracket:
|
||||
leaveMoreIndentedLevels()
|
||||
if level.mode != mScalar:
|
||||
state = ypBlockLineStart
|
||||
|
Loading…
x
Reference in New Issue
Block a user