aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL/src/LuaSL_LSL_tree.h
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-02-02 03:16:00 +1000
committerDavid Walter Seikel2012-02-02 03:16:00 +1000
commit64ba572fbac74b39c4d74d2a5b24289e803c6acb (patch)
tree7429d32d3a9c77744ff6f0291c59573b6f1dc7e4 /LuaSL/src/LuaSL_LSL_tree.h
parentTweak the space around crements, still not perfect though. (diff)
downloadSledjHamr-64ba572fbac74b39c4d74d2a5b24289e803c6acb.zip
SledjHamr-64ba572fbac74b39c4d74d2a5b24289e803c6acb.tar.gz
SledjHamr-64ba572fbac74b39c4d74d2a5b24289e803c6acb.tar.bz2
SledjHamr-64ba572fbac74b39c4d74d2a5b24289e803c6acb.tar.xz
Numby magic.
Diffstat (limited to '')
-rw-r--r--LuaSL/src/LuaSL_LSL_tree.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/LuaSL/src/LuaSL_LSL_tree.h b/LuaSL/src/LuaSL_LSL_tree.h
index 94be1a6..64832d2 100644
--- a/LuaSL/src/LuaSL_LSL_tree.h
+++ b/LuaSL/src/LuaSL_LSL_tree.h
@@ -40,6 +40,7 @@ typedef struct _allowedTypes allowedTypes;
40typedef struct _LSL_Token LSL_Token; 40typedef struct _LSL_Token LSL_Token;
41typedef struct _LSL_Text LSL_Text; 41typedef struct _LSL_Text LSL_Text;
42typedef struct _LSL_Leaf LSL_Leaf; 42typedef struct _LSL_Leaf LSL_Leaf;
43typedef struct _LSL_Numby LSL_Numby;
43typedef struct _LSL_Parenthesis LSL_Parenthesis; 44typedef struct _LSL_Parenthesis LSL_Parenthesis;
44typedef struct _LSL_Identifier LSL_Identifier; 45typedef struct _LSL_Identifier LSL_Identifier;
45typedef struct _LSL_Statement LSL_Statement; 46typedef struct _LSL_Statement LSL_Statement;
@@ -185,6 +186,7 @@ struct _LSL_Leaf
185 float vectorValue[3]; 186 float vectorValue[3];
186 float rotationValue[4]; 187 float rotationValue[4];
187 int integerValue; 188 int integerValue;
189 LSL_Numby *numbyValue;
188 LSL_Leaf *listValue; 190 LSL_Leaf *listValue;
189 const char *stringValue; 191 const char *stringValue;
190 opType operationValue; 192 opType operationValue;
@@ -199,6 +201,17 @@ struct _LSL_Leaf
199 } value; 201 } value;
200}; 202};
201 203
204struct _LSL_Numby
205{
206 LSL_Text text;
207 LSL_Type type;
208 union
209 {
210 float floatValue;
211 int integerValue;
212 } value;
213};
214
202struct _LSL_Parenthesis 215struct _LSL_Parenthesis
203{ 216{
204 LSL_Leaf *contents; 217 LSL_Leaf *contents;
@@ -403,6 +416,7 @@ LSL_Leaf *addFunctionBody(LuaSL_compiler *compiler, LSL_Leaf *function, LSL_Leaf
403LSL_Leaf *addFunctionCall(LuaSL_compiler *compiler, LSL_Leaf *identifier, LSL_Leaf *open, LSL_Leaf *params, LSL_Leaf *close); 416LSL_Leaf *addFunctionCall(LuaSL_compiler *compiler, LSL_Leaf *identifier, LSL_Leaf *open, LSL_Leaf *params, LSL_Leaf *close);
404LSL_Leaf *addIfElse(LuaSL_compiler *compiler, LSL_Leaf *ifBlock, LSL_Leaf *elseBlock); 417LSL_Leaf *addIfElse(LuaSL_compiler *compiler, LSL_Leaf *ifBlock, LSL_Leaf *elseBlock);
405LSL_Leaf *addList(LSL_Leaf *left, LSL_Leaf *list, LSL_Leaf *right); 418LSL_Leaf *addList(LSL_Leaf *left, LSL_Leaf *list, LSL_Leaf *right);
419LSL_Leaf *addNumby(LSL_Leaf *numby);
406LSL_Leaf *addOperation(LuaSL_compiler *compiler, LSL_Leaf *left, LSL_Leaf *lval, LSL_Leaf *right); 420LSL_Leaf *addOperation(LuaSL_compiler *compiler, LSL_Leaf *left, LSL_Leaf *lval, LSL_Leaf *right);
407LSL_Leaf *addParameter(LuaSL_compiler *compiler, LSL_Leaf *type, LSL_Leaf *newParam); 421LSL_Leaf *addParameter(LuaSL_compiler *compiler, LSL_Leaf *type, LSL_Leaf *newParam);
408LSL_Leaf *addParenthesis(LSL_Leaf *lval, LSL_Leaf *expr, LSL_Type type, LSL_Leaf *rval); 422LSL_Leaf *addParenthesis(LSL_Leaf *lval, LSL_Leaf *expr, LSL_Type type, LSL_Leaf *rval);