Skip to content

Commit

Permalink
handle the case when an array line ends with a comment, fixes #46
Browse files Browse the repository at this point in the history
  • Loading branch information
gurkankaymak committed Dec 24, 2023
1 parent a2082e9 commit 9979b59
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,10 @@ func (p *parser) extractArray() (Array, error) {
}

token = p.scanner.TokenText()
if token == commentToken {
p.consumeComment()
token = p.scanner.TokenText()
}

if p.scanner.Line == lastRow && token != commaToken && token != arrayEndToken {
concatenatedValue, err := p.checkConcatenation(value)
Expand Down

0 comments on commit 9979b59

Please sign in to comment.