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
Ex:
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 callingparen_expr()
instead ofparen_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