Skip to content

Commit 32fe80f

Browse files
committed
Parser: allow comma after inline-table newline
1 parent 9b827ac commit 32fe80f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Tomlyn/Parsing/Parser.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,17 @@ private InlineTableSyntax ParseInlineTable()
425425
var item = Open<InlineTableItemSyntax>();
426426
item.KeyValue = ParseKeyValue(false);
427427

428+
while (_token.Kind == TokenKind.NewLine)
429+
{
430+
_currentTrivias.Add(new SyntaxTrivia
431+
{
432+
Span = GetSpanForToken(_token),
433+
Kind = _token.Kind,
434+
Text = _token.GetText(_lexer.Source),
435+
});
436+
NextToken();
437+
}
438+
428439
if (_token.Kind == TokenKind.Comma)
429440
{
430441
item.Comma = EatToken();

0 commit comments

Comments
 (0)