lang: ast, parser: Allow calling anonymous functions
I forgot to plumb this in through the parser. Pretty easy to add, hopefully I didn't forget any weird corner scope cases here.
This commit is contained in:
@@ -566,6 +566,16 @@ call:
|
||||
Var: true, // lambda
|
||||
}
|
||||
}
|
||||
// calling an inline function
|
||||
| func OPEN_PAREN call_args CLOSE_PAREN
|
||||
{
|
||||
posLast(yylex, yyDollar) // our pos
|
||||
$$.expr = &ast.ExprCall{
|
||||
Name: "", // anonymous!
|
||||
Args: $3.exprs,
|
||||
Anon: $1.expr,
|
||||
}
|
||||
}
|
||||
| expr PLUS expr
|
||||
{
|
||||
posLast(yylex, yyDollar) // our pos
|
||||
|
||||
Reference in New Issue
Block a user