diff options
author | David Walter Seikel | 2012-01-17 16:38:32 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-17 16:38:32 +1000 |
commit | fa5db92c5ee7be17a1dbfc04c4a978c2725138ff (patch) | |
tree | 08e9ca2dd888ca2ba4ac1979a3ab8bfef351cbb7 /LuaSL/src/LuaSL_compile.c | |
parent | Disable leaf burning for now, it's crashing. (diff) | |
download | SledjHamr-fa5db92c5ee7be17a1dbfc04c4a978c2725138ff.zip SledjHamr-fa5db92c5ee7be17a1dbfc04c4a978c2725138ff.tar.gz SledjHamr-fa5db92c5ee7be17a1dbfc04c4a978c2725138ff.tar.bz2 SledjHamr-fa5db92c5ee7be17a1dbfc04c4a978c2725138ff.tar.xz |
Check variables, though not looking up function parameters yet.
Diffstat (limited to '')
-rw-r--r-- | LuaSL/src/LuaSL_compile.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/LuaSL/src/LuaSL_compile.c b/LuaSL/src/LuaSL_compile.c index 65a8089..6d82fb6 100644 --- a/LuaSL/src/LuaSL_compile.c +++ b/LuaSL/src/LuaSL_compile.c | |||
@@ -230,6 +230,17 @@ static LSL_Leaf *findVariable(LuaSL_compiler *compiler, const char *name) | |||
230 | return var; | 230 | return var; |
231 | } | 231 | } |
232 | 232 | ||
233 | LSL_Leaf *checkVariable(LuaSL_compiler *compiler, LSL_Leaf *identifier) | ||
234 | { | ||
235 | gameGlobals *game = compiler->game; | ||
236 | LSL_Leaf *var = findVariable(compiler, identifier->value.stringValue); | ||
237 | |||
238 | if (NULL == var) | ||
239 | PE("NOT Found %s!", identifier->value.stringValue); | ||
240 | |||
241 | return var; | ||
242 | } | ||
243 | |||
233 | LSL_Leaf *addOperation(LuaSL_compiler *compiler, LSL_Leaf *left, LSL_Leaf *lval, LSL_Leaf *right) | 244 | LSL_Leaf *addOperation(LuaSL_compiler *compiler, LSL_Leaf *left, LSL_Leaf *lval, LSL_Leaf *right) |
234 | { | 245 | { |
235 | gameGlobals *game = compiler->game; | 246 | gameGlobals *game = compiler->game; |