Add last-expression-return-value to functions as well
We did it for if and block statements, now functions too support the last expression being its return value. If there isn't an expression (e.g. an assign statement) we just return `nil`. Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -243,7 +243,7 @@ GENERATE = [
|
||||
"lparen: Token",
|
||||
"params: Vec<(Token, Option<ExprP>)>",
|
||||
"return_type: Option<ExprP>",
|
||||
"body: Vec<StmtP>",
|
||||
"body: BlockExpr",
|
||||
"rbrace: Token",
|
||||
],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user