This commit is contained in:
Greg 2024-11-02 18:23:58 +02:00
parent 1af4030dc1
commit c1549bbc6d

View file

@ -17,7 +17,12 @@ type ParseError struct {
} }
func (pe *ParseError) Error() string { func (pe *ParseError) Error() string {
return fmt.Sprintf("ParseError [%d][%s]: %s", pe.token.line, pe.token.typ, pe.message) return fmt.Sprintf(
"ParseError [%d][%s]: %s",
pe.token.line,
pe.token.typ,
pe.message,
)
} }
func newParser(tokens []Token) *Parser { func newParser(tokens []Token) *Parser {