aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL/src/LuaSL_LSL_tree.h
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-30 13:33:11 +1000
committerDavid Walter Seikel2012-01-30 13:33:11 +1000
commit8b71bc2d2905ca2ded0789a5534efc914ea84858 (patch)
treea0d16e863f4a65c6dc60bfbe77504e22b950dc3a /LuaSL/src/LuaSL_LSL_tree.h
parenttoken -> toKen. Seems to be a key word somewhere, best to be safe. (diff)
downloadSledjHamr-8b71bc2d2905ca2ded0789a5534efc914ea84858.zip
SledjHamr-8b71bc2d2905ca2ded0789a5534efc914ea84858.tar.gz
SledjHamr-8b71bc2d2905ca2ded0789a5534efc914ea84858.tar.bz2
SledjHamr-8b71bc2d2905ca2ded0789a5534efc914ea84858.tar.xz
Change the way blocks start and end, the look ahead was screwing things.
Diffstat (limited to '')
-rw-r--r--LuaSL/src/LuaSL_LSL_tree.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/LuaSL/src/LuaSL_LSL_tree.h b/LuaSL/src/LuaSL_LSL_tree.h
index 24f838a..e5a415a 100644
--- a/LuaSL/src/LuaSL_LSL_tree.h
+++ b/LuaSL/src/LuaSL_LSL_tree.h
@@ -360,6 +360,7 @@ typedef struct
360#endif 360#endif
361 LSL_Leaf *lval; 361 LSL_Leaf *lval;
362 LSL_Block *currentBlock; 362 LSL_Block *currentBlock;
363 LSL_Function *currentFunction;
363 Eina_Clist danglingCalls; // HEAD for function calls used before the function is defined. 364 Eina_Clist danglingCalls; // HEAD for function calls used before the function is defined.
364 int column, line; 365 int column, line;
365 int undeclared; 366 int undeclared;
@@ -372,6 +373,7 @@ typedef struct
372 373
373 374
374void burnLeaf(void *data); 375void burnLeaf(void *data);
376LSL_Leaf *addBlock(LuaSL_compiler *compiler, LSL_Leaf *left, LSL_Leaf *lval, LSL_Leaf *right);
375LSL_Leaf *addCrement(LuaSL_compiler *compiler, LSL_Leaf *variable, LSL_Leaf *crement); 377LSL_Leaf *addCrement(LuaSL_compiler *compiler, LSL_Leaf *variable, LSL_Leaf *crement);
376LSL_Leaf *addFunction(LuaSL_compiler *compiler, LSL_Leaf *type, LSL_Leaf *identifier, LSL_Leaf *open, LSL_Leaf *params, LSL_Leaf *close); 378LSL_Leaf *addFunction(LuaSL_compiler *compiler, LSL_Leaf *type, LSL_Leaf *identifier, LSL_Leaf *open, LSL_Leaf *params, LSL_Leaf *close);
377LSL_Leaf *addFunctionBody(LuaSL_compiler *compiler, LSL_Leaf *function, LSL_Leaf *block); 379LSL_Leaf *addFunctionBody(LuaSL_compiler *compiler, LSL_Leaf *function, LSL_Leaf *block);
@@ -384,11 +386,10 @@ LSL_Leaf *addStatement(LuaSL_compiler *compiler, LSL_Leaf *lval, LSL_Type type,
384LSL_Leaf *addTypecast(LSL_Leaf *lval, LSL_Leaf *type, LSL_Leaf *rval, LSL_Leaf *expr); 386LSL_Leaf *addTypecast(LSL_Leaf *lval, LSL_Leaf *type, LSL_Leaf *rval, LSL_Leaf *expr);
385LSL_Leaf *addVariable(LuaSL_compiler *compiler, LSL_Leaf *type, LSL_Leaf *identifier, LSL_Leaf *assignment, LSL_Leaf *expr); 387LSL_Leaf *addVariable(LuaSL_compiler *compiler, LSL_Leaf *type, LSL_Leaf *identifier, LSL_Leaf *assignment, LSL_Leaf *expr);
386 388
387void beginBlock(LuaSL_compiler *compiler, LSL_Leaf *block); 389LSL_Leaf *beginBlock(LuaSL_compiler *compiler, LSL_Leaf *block);
388LSL_Leaf *checkVariable(LuaSL_compiler *compiler, LSL_Leaf *identifier); 390LSL_Leaf *checkVariable(LuaSL_compiler *compiler, LSL_Leaf *identifier);
389LSL_Leaf *collectParameters(LuaSL_compiler *compiler, LSL_Leaf *list, LSL_Leaf *comma, LSL_Leaf *newParam); 391LSL_Leaf *collectParameters(LuaSL_compiler *compiler, LSL_Leaf *list, LSL_Leaf *comma, LSL_Leaf *newParam);
390LSL_Leaf *collectStatements(LuaSL_compiler *compiler, LSL_Leaf *list, LSL_Leaf *newStatement); 392LSL_Leaf *collectStatements(LuaSL_compiler *compiler, LSL_Leaf *list, LSL_Leaf *newStatement);
391void endBlock(LuaSL_compiler *compiler, LSL_Leaf *block);
392 393
393void *ParseAlloc(void *(*mallocProc)(size_t)); 394void *ParseAlloc(void *(*mallocProc)(size_t));
394void ParseTrace(FILE *TraceFILE, char *zTracePrompt); 395void ParseTrace(FILE *TraceFILE, char *zTracePrompt);