diff options
Diffstat (limited to '')
-rw-r--r-- | LuaSL/src/LuaSL_LSL_tree.h | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/LuaSL/src/LuaSL_LSL_tree.h b/LuaSL/src/LuaSL_LSL_tree.h index 20277b9..6d122d4 100644 --- a/LuaSL/src/LuaSL_LSL_tree.h +++ b/LuaSL/src/LuaSL_LSL_tree.h | |||
@@ -179,7 +179,7 @@ struct _LSL_Leaf | |||
179 | LSL_Leaf *listValue; | 179 | LSL_Leaf *listValue; |
180 | const char *stringValue; | 180 | const char *stringValue; |
181 | opType operationValue; | 181 | opType operationValue; |
182 | LSL_Parenthesis *parenthesis; | 182 | LSL_Parenthesis *parenthesis; |
183 | LSL_Identifier *identifierValue; | 183 | LSL_Identifier *identifierValue; |
184 | LSL_Statement *statementValue; | 184 | LSL_Statement *statementValue; |
185 | LSL_Block *blockValue; | 185 | LSL_Block *blockValue; |
@@ -207,15 +207,35 @@ struct _LSL_Identifier // For variables and function parameters. | |||
207 | 207 | ||
208 | struct _LSL_Statement | 208 | struct _LSL_Statement |
209 | { | 209 | { |
210 | Eina_Clist statement; | 210 | Eina_Clist statement; // For statement lists, perhaps this is just duplicating the one in LSL_Block? Not actually being used at the moment, except to collect them. On the other hand, I might have been half way through that part. lol |
211 | LSL_Leaf *expressions; // For things like a for statement, might hold three expressions. | 211 | union |
212 | { | ||
213 | LSL_Identifier *identifier; | ||
214 | LSL_Parenthesis *parenthesis; | ||
215 | } stuff; // Nothing has an identifier AND parenthesis, and there will be LOTS of statements, so save some space. | ||
216 | LSL_Leaf *expressions; // A for statement will have three expressions, everything else has zero or one. | ||
217 | LSL_Block *block; | ||
212 | LSL_Type type; // Expression type. | 218 | LSL_Type type; // Expression type. |
219 | /* | ||
220 | expr expr | ||
221 | Variable defines identifier, optional expr | ||
222 | state change identifier | ||
223 | Labels identifier | ||
224 | goto identifier | ||
225 | return optional expr | ||
226 | do expr, block, parens | ||
227 | for exprx3, block, parens | ||
228 | if expr, block, parens | ||
229 | else block | ||
230 | else if expr, block, parens | ||
231 | while expr, block, parens | ||
232 | */ | ||
213 | }; | 233 | }; |
214 | 234 | ||
215 | struct _LSL_Block | 235 | struct _LSL_Block |
216 | { | 236 | { |
217 | LSL_Block *outerBlock; | 237 | LSL_Block *outerBlock; |
218 | Eina_Clist statements; | 238 | Eina_Clist statements; // For statement lists. |
219 | Eina_Hash *variables; // Those variables in this scope. | 239 | Eina_Hash *variables; // Those variables in this scope. |
220 | LSL_Function *function; // A pointer to the function if this block is a function. | 240 | LSL_Function *function; // A pointer to the function if this block is a function. |
221 | }; | 241 | }; |