aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL/src/LuaSL_LSL_tree.h
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-17 15:45:40 +1000
committerDavid Walter Seikel2012-01-17 15:45:40 +1000
commitc300df8ea35ff75530b6cfd187c92c41658cb52d (patch)
tree3889b3e41781945be05f250f859b4324f760c8f3 /LuaSL/src/LuaSL_LSL_tree.h
parentUsing eina string buffer for ignorable text. (diff)
downloadSledjHamr-c300df8ea35ff75530b6cfd187c92c41658cb52d.zip
SledjHamr-c300df8ea35ff75530b6cfd187c92c41658cb52d.tar.gz
SledjHamr-c300df8ea35ff75530b6cfd187c92c41658cb52d.tar.bz2
SledjHamr-c300df8ea35ff75530b6cfd187c92c41658cb52d.tar.xz
Use eina hash for functions, states, and variables.
Diffstat (limited to 'LuaSL/src/LuaSL_LSL_tree.h')
-rw-r--r--LuaSL/src/LuaSL_LSL_tree.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/LuaSL/src/LuaSL_LSL_tree.h b/LuaSL/src/LuaSL_LSL_tree.h
index fd9c65a..2674542 100644
--- a/LuaSL/src/LuaSL_LSL_tree.h
+++ b/LuaSL/src/LuaSL_LSL_tree.h
@@ -223,9 +223,9 @@ struct _LSL_Statement
223struct _LSL_Block 223struct _LSL_Block
224{ 224{
225 LSL_Block *outerBlock; 225 LSL_Block *outerBlock;
226 LSL_Statement **statements; 226// Eina_Hash *statements; // Probably should be some sort of eina list.
227 LSL_Identifier **variables; // Those variables in this scope. 227 Eina_Hash *variables; // Those variables in this scope.
228 int scount, vcount; 228 int scount;
229}; 229};
230 230
231struct _LSL_Function 231struct _LSL_Function
@@ -240,16 +240,15 @@ struct _LSL_State
240{ 240{
241 const char *name; 241 const char *name;
242 LSL_Leaf *block; 242 LSL_Leaf *block;
243 LSL_Function **handlers; 243 Eina_Hash *handlers;
244}; 244};
245 245
246struct _LSL_Script 246struct _LSL_Script
247{ 247{
248 const char *name; 248 const char *name;
249 LSL_Function **functions; 249 Eina_Hash *functions;
250 LSL_State **states; 250 Eina_Hash *states;
251 LSL_Identifier **variables; 251 Eina_Hash *variables;
252 int fcount, scount, vcount;
253}; 252};
254 253
255// Define the type for flex and lemon. 254// Define the type for flex and lemon.
@@ -277,8 +276,8 @@ typedef struct
277#endif 276#endif
278 277
279 278
280void burnLeaf(LSL_Leaf *leaf); 279void burnLeaf(void *data);
281LSL_Leaf *addFunction(LSL_Leaf *type, LSL_Leaf *identifier, LSL_Leaf *open, LSL_Leaf *params, LSL_Leaf *close, LSL_Leaf *block); 280LSL_Leaf *addFunction(LuaSL_compiler *compiler, LSL_Leaf *type, LSL_Leaf *identifier, LSL_Leaf *open, LSL_Leaf *params, LSL_Leaf *close, LSL_Leaf *block);
282LSL_Leaf *addOperation(LuaSL_compiler *compiler, LSL_Leaf *left, LSL_Leaf *lval, LSL_Leaf *right); 281LSL_Leaf *addOperation(LuaSL_compiler *compiler, LSL_Leaf *left, LSL_Leaf *lval, LSL_Leaf *right);
283LSL_Leaf *addParameter(LSL_Leaf *type, LSL_Leaf *newParam); 282LSL_Leaf *addParameter(LSL_Leaf *type, LSL_Leaf *newParam);
284LSL_Leaf *addParenthesis(LSL_Leaf *lval, LSL_Leaf *expr, LSL_Type type, LSL_Leaf *rval); 283LSL_Leaf *addParenthesis(LSL_Leaf *lval, LSL_Leaf *expr, LSL_Type type, LSL_Leaf *rval);