From eb3278594f50be28c048c11d96bd814c1ebbdf3a Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Wed, 1 Feb 2012 22:17:02 +1000 Subject: Deal with parsing if ... else ... --- LuaSL/src/LuaSL_LSL_tree.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'LuaSL/src/LuaSL_LSL_tree.h') diff --git a/LuaSL/src/LuaSL_LSL_tree.h b/LuaSL/src/LuaSL_LSL_tree.h index 87d1af0..b5dff7a 100644 --- a/LuaSL/src/LuaSL_LSL_tree.h +++ b/LuaSL/src/LuaSL_LSL_tree.h @@ -221,6 +221,7 @@ struct _LSL_Statement LSL_Parenthesis *parenthesis; LSL_Leaf *expressions; // A for statement will have three expressions, everything else has zero or one. LSL_Block *block; + LSL_Statement *elseBlock; LSL_Type type; // Expression type. #if LUASL_DIFF_CHECK Eina_Strbuf **ignorable; // Can be up to five of these I think. @@ -397,6 +398,7 @@ LSL_Leaf *addCrement(LuaSL_compiler *compiler, LSL_Leaf *variable, LSL_Leaf *cre LSL_Leaf *addFunction(LuaSL_compiler *compiler, LSL_Leaf *type, LSL_Leaf *identifier, LSL_Leaf *open, LSL_Leaf *params, LSL_Leaf *close); LSL_Leaf *addFunctionBody(LuaSL_compiler *compiler, LSL_Leaf *function, LSL_Leaf *block); LSL_Leaf *addFunctionCall(LuaSL_compiler *compiler, LSL_Leaf *identifier, LSL_Leaf *open, LSL_Leaf *params, LSL_Leaf *close); +LSL_Leaf *addIfElse(LuaSL_compiler *compiler, LSL_Leaf *ifBlock, LSL_Leaf *elseBlock); LSL_Leaf *addOperation(LuaSL_compiler *compiler, LSL_Leaf *left, LSL_Leaf *lval, LSL_Leaf *right); LSL_Leaf *addParameter(LuaSL_compiler *compiler, LSL_Leaf *type, LSL_Leaf *newParam); LSL_Leaf *addParenthesis(LSL_Leaf *lval, LSL_Leaf *expr, LSL_Type type, LSL_Leaf *rval); -- cgit v1.1