Assignments are not expressions in Icarus, however they are treated as expressions while parsing to facilitate named function parameters. For instance, while parsing f(x = 3), the sub-expression x = 3 will be an assignment which we extract before it gets placed into the ast::Call. It's probably best to use a new tag for assignments and update the parse rules so this doesn't have to technically be an expression.
Assignments are not expressions in Icarus, however they are treated as expressions while parsing to facilitate named function parameters. For instance, while parsing
f(x = 3)
, the sub-expressionx = 3
will be an assignment which we extract before it gets placed into theast::Call
. It's probably best to use a new tag for assignments and update the parse rules so this doesn't have to technically be an expression.