From d094c72e1006346adf1c60760fe79e248f6f1d96 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Wed, 1 Feb 2012 23:37:17 +1000 Subject: Parse and output for statements. Also, take care of ignorables on left parens of flow controls. --- LuaSL/src/LuaSL_LSL_tree.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (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 33f860c..cff2bab 100644 --- a/LuaSL/src/LuaSL_LSL_tree.h +++ b/LuaSL/src/LuaSL_LSL_tree.h @@ -219,7 +219,7 @@ struct _LSL_Statement Eina_Clist statement; // For block statement lists, this is the entry. LSL_Identifier *identifier; LSL_Parenthesis *parenthesis; - LSL_Leaf *expressions; // A for statement will have three expressions, everything else has zero or one. + LSL_Leaf *expressions; // A for statement will have three expressions, and two semicolons, everything else has zero or one. LSL_Block *block; LSL_Statement *elseBlock; LSL_Type type; // Expression type. @@ -395,6 +395,7 @@ typedef struct void burnLeaf(void *data); LSL_Leaf *addBlock(LuaSL_compiler *compiler, LSL_Leaf *left, LSL_Leaf *lval, LSL_Leaf *right); LSL_Leaf *addCrement(LuaSL_compiler *compiler, LSL_Leaf *variable, LSL_Leaf *crement); +LSL_Leaf *addFor(LuaSL_compiler *compiler, LSL_Leaf *lval, LSL_Leaf *flow, LSL_Leaf *left, LSL_Leaf *expr0, LSL_Leaf *stat0, LSL_Leaf *expr1, LSL_Leaf *stat1, LSL_Leaf *expr2, LSL_Leaf *right, LSL_Leaf *block); 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); -- cgit v1.1