diff options
author | David Walter Seikel | 2012-01-08 01:52:18 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-08 01:52:18 +1000 |
commit | 2783337014b5ee04ef6e074771048088203aaebd (patch) | |
tree | c8da8a99bc7263815445c069ceffd6584d9faadf /LuaSL/src/LuaSL_LSL_tree.h | |
parent | Parse an actual file. (diff) | |
download | SledjHamr-2783337014b5ee04ef6e074771048088203aaebd.zip SledjHamr-2783337014b5ee04ef6e074771048088203aaebd.tar.gz SledjHamr-2783337014b5ee04ef6e074771048088203aaebd.tar.bz2 SledjHamr-2783337014b5ee04ef6e074771048088203aaebd.tar.xz |
Parenthesis and statement parsing.
Diffstat (limited to '')
-rw-r--r-- | LuaSL/src/LuaSL_LSL_tree.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/LuaSL/src/LuaSL_LSL_tree.h b/LuaSL/src/LuaSL_LSL_tree.h index e01273b..597db54 100644 --- a/LuaSL/src/LuaSL_LSL_tree.h +++ b/LuaSL/src/LuaSL_LSL_tree.h | |||
@@ -3,7 +3,7 @@ | |||
3 | #define __EXPRESSION_H__ | 3 | #define __EXPRESSION_H__ |
4 | 4 | ||
5 | //#define LUASL_USE_ENUM | 5 | //#define LUASL_USE_ENUM |
6 | //#define LUASL_DEBUG | 6 | #define LUASL_DEBUG |
7 | 7 | ||
8 | #ifndef LUASL_USE_ENUM | 8 | #ifndef LUASL_USE_ENUM |
9 | #include "LuaSL_yaccer.tab.h" | 9 | #include "LuaSL_yaccer.tab.h" |
@@ -134,7 +134,7 @@ typedef int LSL_Type; | |||
134 | typedef struct | 134 | typedef struct |
135 | { | 135 | { |
136 | LSL_Type type; | 136 | LSL_Type type; |
137 | struct LSL_AST *expressions; | 137 | struct LSL_AST *expression; |
138 | } LSL_Statement; | 138 | } LSL_Statement; |
139 | 139 | ||
140 | typedef struct | 140 | typedef struct |
@@ -258,6 +258,9 @@ typedef struct | |||
258 | LSL_AST *addExpression(LSL_AST *exp); | 258 | LSL_AST *addExpression(LSL_AST *exp); |
259 | LSL_AST *addInteger(int value); | 259 | LSL_AST *addInteger(int value); |
260 | LSL_AST *addOperation(LSL_Operation type, LSL_AST *left, LSL_AST *right); | 260 | LSL_AST *addOperation(LSL_Operation type, LSL_AST *left, LSL_AST *right); |
261 | LSL_AST *addParenthesis(LSL_AST *expr); | ||
262 | LSL_Statement *createStatement(LSL_Type type, LSL_AST *expr); | ||
263 | LSL_AST *addStatement(LSL_Statement *statement, LSL_AST *left); | ||
261 | 264 | ||
262 | int yyerror(const char *msg); | 265 | int yyerror(const char *msg); |
263 | int yyparse(void *param); | 266 | int yyparse(void *param); |