diff options
author | Tedd Hansen | 2007-08-15 19:25:29 +0000 |
---|---|---|
committer | Tedd Hansen | 2007-08-15 19:25:29 +0000 |
commit | 9c3251b1777cee909246f468aa672c2164a45076 (patch) | |
tree | 9e27669da596becd2647d350ea617b9fa70e27d6 /OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs | |
parent | *Added the ability to run commands after all regions have started up (diff) | |
download | opensim-SC-9c3251b1777cee909246f468aa672c2164a45076.zip opensim-SC-9c3251b1777cee909246f468aa672c2164a45076.tar.gz opensim-SC-9c3251b1777cee909246f468aa672c2164a45076.tar.bz2 opensim-SC-9c3251b1777cee909246f468aa672c2164a45076.tar.xz |
Bugfixes in LSL compiler. Changed most datatypes to int (instead of UInt32) and double (instead of float).
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs index 5c5ac92..13e3f2e 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs | |||
@@ -15,7 +15,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
15 | { | 15 | { |
16 | DataTypes.Add("void", "void"); | 16 | DataTypes.Add("void", "void"); |
17 | DataTypes.Add("integer", "int"); | 17 | DataTypes.Add("integer", "int"); |
18 | DataTypes.Add("float", "float"); | 18 | DataTypes.Add("float", "double"); |
19 | DataTypes.Add("string", "string"); | 19 | DataTypes.Add("string", "string"); |
20 | DataTypes.Add("key", "string"); | 20 | DataTypes.Add("key", "string"); |
21 | DataTypes.Add("vector", "Axiom.Math.Vector3"); | 21 | DataTypes.Add("vector", "Axiom.Math.Vector3"); |
@@ -58,6 +58,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
58 | C = Script.Substring(p, 1); | 58 | C = Script.Substring(p, 1); |
59 | while (true) | 59 | while (true) |
60 | { | 60 | { |
61 | // found " and last was not \ so this is not an escaped \" | ||
61 | if (C == "\"" && last_was_escape == false) | 62 | if (C == "\"" && last_was_escape == false) |
62 | { | 63 | { |
63 | // Toggle inside/outside quote | 64 | // Toggle inside/outside quote |
@@ -68,12 +69,18 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
68 | } | 69 | } |
69 | else | 70 | else |
70 | { | 71 | { |
72 | if (quote == "") | ||
73 | { | ||
74 | // We didn't replace quote, probably because of empty string? | ||
75 | _Script += quote_replacement_string + quote_replaced_count.ToString().PadLeft(5, "0".ToCharArray()[0]); | ||
76 | } | ||
71 | // We just left a quote | 77 | // We just left a quote |
72 | QUOTES.Add(quote_replacement_string + quote_replaced_count.ToString().PadLeft(5, "0".ToCharArray()[0]), quote); | 78 | QUOTES.Add(quote_replacement_string + quote_replaced_count.ToString().PadLeft(5, "0".ToCharArray()[0]), quote); |
73 | quote = ""; | 79 | quote = ""; |
74 | } | 80 | } |
75 | break; | 81 | break; |
76 | } | 82 | } |
83 | |||
77 | if (!in_quote) | 84 | if (!in_quote) |
78 | { | 85 | { |
79 | // We are not inside a quote | 86 | // We are not inside a quote |