mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 05:45:37 +08:00
Add constants wrapping code from XEngine to DNE. This syncs up the parsers
between the engines again. Also, committed r60 in opensim libs with the parser source changes.
This commit is contained in:
@@ -728,14 +728,18 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
|
||||
int dotIndex = c.Value.IndexOf('.') + 1;
|
||||
if (0 < dotIndex && (dotIndex == c.Value.Length || !Char.IsDigit(c.Value[dotIndex])))
|
||||
c.Value = c.Value.Insert(dotIndex, "0");
|
||||
c.Value = "new LSL_Types.LSLFloat("+c.Value+")";
|
||||
}
|
||||
else if("LSL_Types.LSLInteger" == c.Type)
|
||||
{
|
||||
c.Value = "new LSL_Types.LSLInteger("+c.Value+")";
|
||||
}
|
||||
else if("LSL_Types.LSLString" == c.Type)
|
||||
{
|
||||
c.Value = "new LSL_Types.LSLString(\""+c.Value+"\")";
|
||||
}
|
||||
|
||||
// need to quote strings
|
||||
if ("LSL_Types.LSLString" == c.Type)
|
||||
retstr += Generate("\"");
|
||||
retstr += Generate(c.Value, c);
|
||||
if ("LSL_Types.LSLString" == c.Type)
|
||||
retstr += Generate("\"");
|
||||
|
||||
return retstr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user