riff-lang / riff

The Riff programming language
https://riff.cx
BSD Zero Clause License
23 stars 1 forks source link

Standalone parenthesized expressions disallow comma-delimited expressions #70

Open darrylabbate opened 10 months ago

darrylabbate commented 10 months ago

Ex:

(1,2)

Not that this would be particularly useful, but it threw me off-guard when the compiler threw an error for this instead of simply evaluating and throwing away. Obviously due to the nud() function in the parser simply calling paren_expr() instead of paren_expr_list() when it encounters a ( token.

It's unclear whether all instances of paren_expr() (be mindful of use in ternary op parsing) should allow a comma-delimited list of expressions