diff options
author | David Walter Seikel | 2012-02-04 22:48:27 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-02-04 22:48:27 +1000 |
commit | 23a65d1e39bf6123fd904d5819f03ff5dd36ea4e (patch) | |
tree | d6669226d969d403f7eb75051dd172f28da3c63c /LuaSL/src | |
parent | Implement typecasts when needed. Actually, doing some extras for the moment. (diff) | |
download | SledjHamr-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 'LuaSL/src')
-rw-r--r-- | LuaSL/src/LuaSL_compile.c | 18 |
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 |
4 | Bit of a problem, but I think it will go away once llGetSubString() is implemented. | ||
5 | The problem is that Lua can't convert the string "0x" to a number, though it's fine with "0x0". | ||
6 | In LSL any string that does not represent a number gets converted to 0 by a typecast. | ||
7 | 4 | ||
8 | In 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 | ||
10 | Sooo, should actually implement that typecast. | 7 | Gets converted to - |
11 | 8 | ||
12 | function --[[integer]] channel() | 9 | RefPos.z --[[+=]] = RefPos + --[[float]] Zoffset/100.; |
13 | return --[[(integer)]] ("0x" .. _LSL.llGetSubString( --[[(string)]] _LSL.llGetKey(), -4, -1)); | ||
14 | end | ||
15 | 10 | ||
16 | function setBalls( --[[string]] cmd) | ||
17 | local --[[integer]] ch=channel(); | ||
18 | _LSL.llSay(ch+ix, cmd); | ||
19 | end | ||
20 | */ | 11 | */ |
21 | 12 | ||
22 | |||
23 | static LSL_Leaf *evaluateFloatToken(LSL_Leaf *content, LSL_Leaf *left, LSL_Leaf *right); | 13 | static LSL_Leaf *evaluateFloatToken(LSL_Leaf *content, LSL_Leaf *left, LSL_Leaf *right); |
24 | static LSL_Leaf *evaluateIntegerToken(LSL_Leaf *content, LSL_Leaf *left, LSL_Leaf *right); | 14 | static LSL_Leaf *evaluateIntegerToken(LSL_Leaf *content, LSL_Leaf *left, LSL_Leaf *right); |
25 | static LSL_Leaf *evaluateNoToken(LSL_Leaf *content, LSL_Leaf *left, LSL_Leaf *right); | 15 | static LSL_Leaf *evaluateNoToken(LSL_Leaf *content, LSL_Leaf *left, LSL_Leaf *right); |