aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL/src/LuaSL_compile.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--LuaSL/src/LuaSL_compile.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/LuaSL/src/LuaSL_compile.c b/LuaSL/src/LuaSL_compile.c
index e1875c6..11860ad 100644
--- a/LuaSL/src/LuaSL_compile.c
+++ b/LuaSL/src/LuaSL_compile.c
@@ -131,8 +131,8 @@ allowedTypes allowed[] =
131 {OT_nothing, "nothing", (ST_NONE)}, // 131 {OT_nothing, "nothing", (ST_NONE)}, //
132 132
133 {OT_bool, "boolean", (ST_BOOL_NOT)}, // bool ! 133 {OT_bool, "boolean", (ST_BOOL_NOT)}, // bool !
134 {OT_integer, "integer", (ST_BIT_NOT | ST_NEGATE)}, // int - ~ 134 {OT_integer, "integer", (ST_BOOL_NOT | ST_BIT_NOT | ST_NEGATE)}, // int ! - ~
135 {OT_float, "float", (ST_NONE)}, // float - 135 {OT_float, "float", (ST_BOOL_NOT)}, // float ! -
136 {OT_key, "key", (ST_NONE)}, // 136 {OT_key, "key", (ST_NONE)}, //
137 {OT_list, "list", (ST_NONE)}, // 137 {OT_list, "list", (ST_NONE)}, //
138 {OT_rotation, "rotation", (ST_NONE)}, // 138 {OT_rotation, "rotation", (ST_NONE)}, //
@@ -260,6 +260,10 @@ LSL_Leaf *addOperation(LuaSL_compiler *compiler, LSL_Leaf *left, LSL_Leaf *lval,
260 lval->left = left; 260 lval->left = left;
261 lval->right = right; 261 lval->right = right;
262 262
263 // Convert subtract to negate if needed.
264 if ((NULL == left) && (LSL_SUBTRACT == lval->token->type))
265 lval->token = tokens[LSL_NEGATION - lowestToken];
266
263 // Try to figure out what type of operation this is. 267 // Try to figure out what type of operation this is.
264 if (NULL == left) 268 if (NULL == left)
265 lType = OT_nothing; 269 lType = OT_nothing;