@@ -7000,43 +7000,40 @@ JsonKeyValuePair JsonKeyValuePair(boolean isFirstEntry) : {
70007000}
70017001{
70027002 (
7003- // Key part
7004- (
7005- // lookahead because key is a valid column name
7006- LOOKAHEAD(2) (
7007- <K_KEY> { usingKeyKeyword = true; }
7008- (
7009- keyToken = <S_CHAR_LITERAL> { key = keyToken.image; } |
7010- key = Column()
7011- )
7012- )
7013- |
7014- LOOKAHEAD(16) ( key = AllTableColumns(false) { isWildcard = true; } )
7015- |
7016- key = AllColumns(false) { isWildcard = true; }
7017- |
7018- key = Column()
7019- |
7020- LOOKAHEAD({getAsBoolean(Feature.allowExpressionAsJsonObjectKey)}) key = Expression()
7021- |
7022- keyToken = <S_CHAR_LITERAL> { key = keyToken.image; }
7023- )
7024-
7025- // Optional Separator + Value - Is not allowed with * or t1.*
7026- [ LOOKAHEAD(1, { !isWildcard } )
7003+ // lookahead because key is a valid column name
7004+ LOOKAHEAD(2) (
7005+ <K_KEY> { usingKeyKeyword = true; }
70277006 (
7028- <K_VALUE> { kvSeparator = JsonKeyValuePairSeparator.VALUE; }
7029- |
7030- <DOUBLE_COLON> { kvSeparator = JsonKeyValuePairSeparator.COLON; }
7031- |
7032- LOOKAHEAD({getAsBoolean(Feature.allowCommaAsKeyValueSeparator)}) <K_COMMA> { kvSeparator = JsonKeyValuePairSeparator.COMMA; }
7007+ keyToken = <S_CHAR_LITERAL> { key = keyToken.image; } |
7008+ key = Column()
70337009 )
7034- expression = Expression()
7035- ]
7036-
7037- // Optional: FORMAT JSON - Is not allowed with * or t1.*
7038- [ LOOKAHEAD(1, { !isWildcard } ) <K_FORMAT> <K_JSON> { usingFormatJason = true; } ]
7010+ )
7011+ |
7012+ LOOKAHEAD(16) key = AllTableColumns(false) { isWildcard = true; }
7013+ |
7014+ LOOKAHEAD(2) key = AllColumns(false) { isWildcard = true; }
7015+ |
7016+ LOOKAHEAD(2) key = Column()
7017+ |
7018+ LOOKAHEAD({getAsBoolean(Feature.allowExpressionAsJsonObjectKey)}) key = Expression()
7019+ |
7020+ keyToken = <S_CHAR_LITERAL> { key = keyToken.image; }
70397021 )
7022+
7023+ // Optional Separator + Value - Is not allowed with * or t1.*
7024+ [ LOOKAHEAD(1, { !isWildcard } )
7025+ (
7026+ <K_VALUE> { kvSeparator = JsonKeyValuePairSeparator.VALUE; }
7027+ |
7028+ <DOUBLE_COLON> { kvSeparator = JsonKeyValuePairSeparator.COLON; }
7029+ |
7030+ LOOKAHEAD({getAsBoolean(Feature.allowCommaAsKeyValueSeparator)}) <K_COMMA> { kvSeparator = JsonKeyValuePairSeparator.COMMA; }
7031+ )
7032+ expression = Expression()
7033+ ]
7034+
7035+ // Optional: FORMAT JSON - Is not allowed with * or t1.*
7036+ [ LOOKAHEAD(1, { !isWildcard } ) <K_FORMAT> <K_JSON> { usingFormatJason = true; } ]
70407037 {
70417038 final JsonKeyValuePair keyValuePair = new JsonKeyValuePair( key, expression, usingKeyKeyword, kvSeparator );
70427039 keyValuePair.setUsingFormatJson( usingFormatJason );
0 commit comments