Skip to content

incorrect proccall definition #9

@bigfighter

Description

@bigfighter

"""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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions