Skip to content

Commit 322d331

Browse files
committed
Lexer: recognize comma in key mode
Allows inline table parsing to consume , separators when the parser switches back to key mode after a scalar value.
1 parent f2653e7 commit 322d331

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Tomlyn/Parsing/Lexer.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ private void NextTokenForKey()
124124
NextChar();
125125
_token = new SyntaxTokenValue(TokenKind.Equal, start, start);
126126
break;
127+
case ',':
128+
_token = new SyntaxTokenValue(TokenKind.Comma, start, start);
129+
NextChar();
130+
break;
127131
case '{':
128132
_token = new SyntaxTokenValue(TokenKind.OpenBrace, _position, _position);
129133
NextChar();

0 commit comments

Comments
 (0)