aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL/src/LuaSL_LSL_tree.h
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-21 12:31:56 +1000
committerDavid Walter Seikel2012-01-21 12:31:56 +1000
commit0d4da92f1e19d786d8ac9a1ff10270d2eca46765 (patch)
tree66f8f8a784179086d83d5cc793831389ccf51854 /LuaSL/src/LuaSL_LSL_tree.h
parentFix up the comments to match the code, and add more. (diff)
downloadSledjHamr-0d4da92f1e19d786d8ac9a1ff10270d2eca46765.zip
SledjHamr-0d4da92f1e19d786d8ac9a1ff10270d2eca46765.tar.gz
SledjHamr-0d4da92f1e19d786d8ac9a1ff10270d2eca46765.tar.bz2
SledjHamr-0d4da92f1e19d786d8ac9a1ff10270d2eca46765.tar.xz
More stuff for parsing blocks and their statement lists.
Diffstat (limited to '')
-rw-r--r--LuaSL/src/LuaSL_LSL_tree.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/LuaSL/src/LuaSL_LSL_tree.h b/LuaSL/src/LuaSL_LSL_tree.h
index c22ceae..41435ff 100644
--- a/LuaSL/src/LuaSL_LSL_tree.h
+++ b/LuaSL/src/LuaSL_LSL_tree.h
@@ -191,6 +191,7 @@ struct _LSL_Identifier // For variables and function parameters.
191 191
192struct _LSL_Statement 192struct _LSL_Statement
193{ 193{
194 Eina_Clist statement;
194 LSL_Leaf *expressions; // For things like a for statement, might hold three expressions. 195 LSL_Leaf *expressions; // For things like a for statement, might hold three expressions.
195 LSL_Type type; // Expression type. 196 LSL_Type type; // Expression type.
196}; 197};
@@ -198,7 +199,7 @@ struct _LSL_Statement
198struct _LSL_Block 199struct _LSL_Block
199{ 200{
200 LSL_Block *outerBlock; 201 LSL_Block *outerBlock;
201// Eina_Hash *statements; // Probably should be some sort of eina list. 202 Eina_Clist statements;
202 Eina_Hash *variables; // Those variables in this scope. 203 Eina_Hash *variables; // Those variables in this scope.
203 LSL_Function *function; // A pointer to the function if this block is a function. 204 LSL_Function *function; // A pointer to the function if this block is a function.
204}; 205};
@@ -334,6 +335,7 @@ LSL_Leaf *addVariable(LuaSL_compiler *compiler, LSL_Leaf *type, LSL_Leaf *identi
334void beginBlock(LuaSL_compiler *compiler, LSL_Leaf *block); 335void beginBlock(LuaSL_compiler *compiler, LSL_Leaf *block);
335LSL_Leaf *checkVariable(LuaSL_compiler *compiler, LSL_Leaf *identifier); 336LSL_Leaf *checkVariable(LuaSL_compiler *compiler, LSL_Leaf *identifier);
336LSL_Leaf *collectParameters(LuaSL_compiler *compiler, LSL_Leaf *list, LSL_Leaf *comma, LSL_Leaf *newParam); 337LSL_Leaf *collectParameters(LuaSL_compiler *compiler, LSL_Leaf *list, LSL_Leaf *comma, LSL_Leaf *newParam);
338LSL_Leaf *collectStatements(LuaSL_compiler *compiler, LSL_Leaf *list, LSL_Leaf *newStatement);
337void endBlock(LuaSL_compiler *compiler, LSL_Leaf *block); 339void endBlock(LuaSL_compiler *compiler, LSL_Leaf *block);
338 340
339void *ParseAlloc(void *(*mallocProc)(size_t)); 341void *ParseAlloc(void *(*mallocProc)(size_t));