From 4243226738acc595de4cfa594a309f831b86f2a1 Mon Sep 17 00:00:00 2001 From: Felix Krause Date: Thu, 7 Jan 2016 11:29:37 +0100 Subject: [PATCH] Support alias on more positions --- private/parser.nim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/private/parser.nim b/private/parser.nim index 0ab506f..2de1014 100644 --- a/private/parser.nim +++ b/private/parser.nim @@ -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