aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL/src/LuaSL_compile.c
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-02-04 22:48:27 +1000
committerDavid Walter Seikel2012-02-04 22:48:27 +1000
commit23a65d1e39bf6123fd904d5819f03ff5dd36ea4e (patch)
treed6669226d969d403f7eb75051dd172f28da3c63c /LuaSL/src/LuaSL_compile.c
parentImplement typecasts when needed. Actually, doing some extras for the moment. (diff)
downloadSledjHamr-23a65d1e39bf6123fd904d5819f03ff5dd36ea4e.zip
SledjHamr-23a65d1e39bf6123fd904d5819f03ff5dd36ea4e.tar.gz
SledjHamr-23a65d1e39bf6123fd904d5819f03ff5dd36ea4e.tar.bz2
SledjHamr-23a65d1e39bf6123fd904d5819f03ff5dd36ea4e.tar.xz
Comment new problem - dot operator not mixing too well with unplain assignments.
Diffstat (limited to '')
-rw-r--r--LuaSL/src/LuaSL_compile.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/LuaSL/src/LuaSL_compile.c b/LuaSL/src/LuaSL_compile.c
index cd8494a..610753a 100644
--- a/LuaSL/src/LuaSL_compile.c
+++ b/LuaSL/src/LuaSL_compile.c
@@ -1,25 +1,15 @@
1#include "LuaSL.h" 1#include "LuaSL.h"
2 2
3/* TODO - 3/* TODO - problem dejour
4Bit of a problem, but I think it will go away once llGetSubString() is implemented.
5The problem is that Lua can't convert the string "0x" to a number, though it's fine with "0x0".
6In LSL any string that does not represent a number gets converted to 0 by a typecast.
7 4
8In other cases the LSL code is typecasting a string to an integer, but Lua can't coz it's not a real number in the string. 5 RefPos.z += (float) Zoffset / 100.;
9 6
10Sooo, should actually implement that typecast. 7Gets converted to -
11 8
12function --[[integer]] channel() 9 RefPos.z --[[+=]] = RefPos + --[[float]] Zoffset/100.;
13 return --[[(integer)]] ("0x" .. _LSL.llGetSubString( --[[(string)]] _LSL.llGetKey(), -4, -1));
14end
15 10
16function setBalls( --[[string]] cmd)
17 local --[[integer]] ch=channel();
18 _LSL.llSay(ch+ix, cmd);
19end
20*/ 11*/
21 12
22
23static LSL_Leaf *evaluateFloatToken(LSL_Leaf *content, LSL_Leaf *left, LSL_Leaf *right); 13static LSL_Leaf *evaluateFloatToken(LSL_Leaf *content, LSL_Leaf *left, LSL_Leaf *right);
24static LSL_Leaf *evaluateIntegerToken(LSL_Leaf *content, LSL_Leaf *left, LSL_Leaf *right); 14static LSL_Leaf *evaluateIntegerToken(LSL_Leaf *content, LSL_Leaf *left, LSL_Leaf *right);
25static LSL_Leaf *evaluateNoToken(LSL_Leaf *content, LSL_Leaf *left, LSL_Leaf *right); 15static LSL_Leaf *evaluateNoToken(LSL_Leaf *content, LSL_Leaf *left, LSL_Leaf *right);