rspivak/lsbasi

incorrect proccall definition

Opened this issue · 0 comments

"""proccall_statement : ID LPAREN expr? (COMMA expr)* RPAREN"""

It currently reads """proccall_statement : ID LPAREN expr? (COMMA expr)* RPAREN"""
I believe the correct version is """proccall_statement : ID LPAREN (expr (COMMA expr)*)? RPAREN""", because otherwise foobar(, b, c) would be valid.

If I'm right, then the only additional change is that the while loop

while self.current_token.type == TokenType.COMMA:
needs to be indented.