diff --git a/pkg/parser/parser.go b/pkg/parser/parser.go index 64f1700..f956139 100644 --- a/pkg/parser/parser.go +++ b/pkg/parser/parser.go @@ -172,7 +172,7 @@ func (p *Parser) ErrorString(message string, code string) { func (p *Parser) Expect(tokenType string, tokenValue string) ast.Position { if !p.IsCurrent(tokenType, tokenValue) { var msg string - if tokenType == ast.TypeNewline { + if tokenType == ast.TypeNewline || tokenType == ast.TypeComment { msg = "Expected newline" } else { msg = fmt.Sprintf("Expected token '%s'(%s)", tokenValue, tokenType)