From 33567741f5c3b0bc80dd7d208db5857989ac0e5d Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 19 Oct 2016 10:38:25 +0200 Subject: [PATCH] - fixed: The parser was not generating a compound statement node for anonymous action functions. --- src/scripting/zscript/zcc-parse.lemon | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/scripting/zscript/zcc-parse.lemon b/src/scripting/zscript/zcc-parse.lemon index 595f2a3182..45b7a99ffe 100644 --- a/src/scripting/zscript/zcc-parse.lemon +++ b/src/scripting/zscript/zcc-parse.lemon @@ -522,7 +522,12 @@ light_list(X) ::= light_list(A) COMMA STRCONST(B). } /* A state action can be either a compound statement or a single action function call. */ -state_action(X) ::= LBRACE statement_list(A) scanner_mode RBRACE. { X = A; /*X-overwrites-A*/ } +state_action(X) ::= LBRACE(T) statement_list(A) scanner_mode RBRACE. +{ + NEW_AST_NODE(CompoundStmt,stmt,T); + stmt->Content = A; + X = stmt; +} state_action(X) ::= LBRACE error scanner_mode RBRACE. { X = NULL; } state_action(X) ::= state_call(A) scanner_mode SEMICOLON. { X = A; /*X-overwrites-A*/ }