diff options
Diffstat (limited to 'LuaSL/src/LuaSL_LSL_tree.h')
-rw-r--r-- | LuaSL/src/LuaSL_LSL_tree.h | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/LuaSL/src/LuaSL_LSL_tree.h b/LuaSL/src/LuaSL_LSL_tree.h index 147ca5e..26e7ee8 100644 --- a/LuaSL/src/LuaSL_LSL_tree.h +++ b/LuaSL/src/LuaSL_LSL_tree.h | |||
@@ -38,6 +38,7 @@ | |||
38 | 38 | ||
39 | typedef struct _allowedTypes allowedTypes; | 39 | typedef struct _allowedTypes allowedTypes; |
40 | typedef struct _LSL_Token LSL_Token; | 40 | typedef struct _LSL_Token LSL_Token; |
41 | typedef struct _LSL_Text LSL_Text; | ||
41 | typedef struct _LSL_Leaf LSL_Leaf; | 42 | typedef struct _LSL_Leaf LSL_Leaf; |
42 | typedef struct _LSL_Parenthesis LSL_Parenthesis; | 43 | typedef struct _LSL_Parenthesis LSL_Parenthesis; |
43 | typedef struct _LSL_Identifier LSL_Identifier; | 44 | typedef struct _LSL_Identifier LSL_Identifier; |
@@ -160,6 +161,14 @@ struct _LSL_Token | |||
160 | evaluateToken evaluate; | 161 | evaluateToken evaluate; |
161 | }; | 162 | }; |
162 | 163 | ||
164 | struct _LSL_Text | ||
165 | { | ||
166 | const char *text; | ||
167 | #if LUASL_DIFF_CHECK | ||
168 | Eina_Strbuf *ignorableText; | ||
169 | #endif | ||
170 | }; | ||
171 | |||
163 | struct _LSL_Leaf | 172 | struct _LSL_Leaf |
164 | { | 173 | { |
165 | LSL_Leaf *left; | 174 | LSL_Leaf *left; |
@@ -201,8 +210,8 @@ struct _LSL_Parenthesis | |||
201 | 210 | ||
202 | struct _LSL_Identifier // For variables and function parameters. | 211 | struct _LSL_Identifier // For variables and function parameters. |
203 | { | 212 | { |
204 | const char *name; | 213 | LSL_Text name; |
205 | LSL_Leaf value; | 214 | LSL_Leaf value; |
206 | }; | 215 | }; |
207 | 216 | ||
208 | struct _LSL_Statement | 217 | struct _LSL_Statement |
@@ -246,10 +255,10 @@ struct _LSL_Block | |||
246 | 255 | ||
247 | struct _LSL_Function | 256 | struct _LSL_Function |
248 | { | 257 | { |
249 | const char *name; | 258 | LSL_Text name; |
250 | LSL_Leaf *type; | 259 | LSL_Leaf *type; |
251 | #if LUASL_DIFF_CHECK | 260 | #if LUASL_DIFF_CHECK |
252 | LSL_Leaf *params; // So we store the parenthesis, and their ignorables. | 261 | // LSL_Leaf *params; // So we store the parenthesis, and their ignorables. |
253 | // This points to the params leaf, which is a function, pointing to this structure. The actual params are in vars. | 262 | // This points to the params leaf, which is a function, pointing to this structure. The actual params are in vars. |
254 | #endif | 263 | #endif |
255 | Eina_Inarray vars; // Eina Inarray has not been released yet (Eina 1.2). | 264 | Eina_Inarray vars; // Eina Inarray has not been released yet (Eina 1.2). |
@@ -266,7 +275,8 @@ struct _LSL_FunctionCall | |||
266 | 275 | ||
267 | struct _LSL_State | 276 | struct _LSL_State |
268 | { | 277 | { |
269 | const char *name; | 278 | LSL_Text name; |
279 | LSL_Text state; | ||
270 | LSL_Leaf *block; | 280 | LSL_Leaf *block; |
271 | Eina_Hash *handlers; | 281 | Eina_Hash *handlers; |
272 | }; | 282 | }; |
@@ -382,7 +392,7 @@ LSL_Leaf *addFunctionCall(LuaSL_compiler *compiler, LSL_Leaf *identifier, LSL_Le | |||
382 | LSL_Leaf *addOperation(LuaSL_compiler *compiler, LSL_Leaf *left, LSL_Leaf *lval, LSL_Leaf *right); | 392 | LSL_Leaf *addOperation(LuaSL_compiler *compiler, LSL_Leaf *left, LSL_Leaf *lval, LSL_Leaf *right); |
383 | LSL_Leaf *addParameter(LuaSL_compiler *compiler, LSL_Leaf *type, LSL_Leaf *newParam); | 393 | LSL_Leaf *addParameter(LuaSL_compiler *compiler, LSL_Leaf *type, LSL_Leaf *newParam); |
384 | LSL_Leaf *addParenthesis(LSL_Leaf *lval, LSL_Leaf *expr, LSL_Type type, LSL_Leaf *rval); | 394 | LSL_Leaf *addParenthesis(LSL_Leaf *lval, LSL_Leaf *expr, LSL_Type type, LSL_Leaf *rval); |
385 | LSL_Leaf *addState(LuaSL_compiler *compiler, LSL_Leaf *identifier, LSL_Leaf *block); | 395 | LSL_Leaf *addState(LuaSL_compiler *compiler, LSL_Leaf *state, LSL_Leaf *identifier, LSL_Leaf *block); |
386 | LSL_Leaf *addStatement(LuaSL_compiler *compiler, LSL_Leaf *lval, LSL_Type type, LSL_Leaf *left, LSL_Leaf *expr, LSL_Leaf *right, LSL_Leaf *block, LSL_Leaf *identifier); | 396 | LSL_Leaf *addStatement(LuaSL_compiler *compiler, LSL_Leaf *lval, LSL_Type type, LSL_Leaf *left, LSL_Leaf *expr, LSL_Leaf *right, LSL_Leaf *block, LSL_Leaf *identifier); |
387 | LSL_Leaf *addTypecast(LSL_Leaf *lval, LSL_Leaf *type, LSL_Leaf *rval, LSL_Leaf *expr); | 397 | LSL_Leaf *addTypecast(LSL_Leaf *lval, LSL_Leaf *type, LSL_Leaf *rval, LSL_Leaf *expr); |
388 | LSL_Leaf *addVariable(LuaSL_compiler *compiler, LSL_Leaf *type, LSL_Leaf *identifier, LSL_Leaf *assignment, LSL_Leaf *expr); | 398 | LSL_Leaf *addVariable(LuaSL_compiler *compiler, LSL_Leaf *type, LSL_Leaf *identifier, LSL_Leaf *assignment, LSL_Leaf *expr); |