Skip to content

Commit

Permalink
fix unexpected token BlockEnd (}) (#49)
Browse files Browse the repository at this point in the history
* fix unexpected token BlockEnd (})

* fix detecting end of the block

---------

Co-authored-by: Tufan Barış Yıldırım <tufanbarisyildirim@gmail.com>
  • Loading branch information
Nobilta and tufanbarisyildirim authored Oct 13, 2024
1 parent d38eb71 commit e73b7dd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,9 @@ func (p *Parser) parseStatement(isSkipValidDirective bool) (config.IDirective, e
//parse parameters until the end.
for p.nextToken(); p.currentToken.IsParameterEligible(); p.nextToken() {
d.Parameters = append(d.Parameters, p.currentToken.Literal)
if p.currentToken.Is(token.BlockEnd) {
return d, nil
}
}

//if we find a semicolon it is a directive, we will check directive converters
Expand Down

0 comments on commit e73b7dd

Please sign in to comment.