Parens / grouping gives "params should be separated by commas" error
Closed this issue · 2 comments
benhoyt commented
Nice work on this! I'm doing some stuff in Lox and Go, and ran across what I think is a bug in your parser. The following program produces an unexpected error:
$ echo 'var ch = 40; print (ch >= 48);' | ~/go/bin/golox
> [line 1] Error at >=: params should be separated by commas.
But it's a perfectly valid Lox program, and JLox handles it fine (and prints false
as expected).
aliwalker commented
Hi, benhoyt! Thanks for trying out my implementation of lox. I'm really sorry I haven't checked this repo for this a long time. I fixed this bug. It was because I introduced the lambda function notation. Now the parser was fixed. :-)
benhoyt commented
Excellent, thanks!