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:
Melanie Thielker
2008-09-23 14:17:32 +00:00
parent d95794d05c
commit 8ac4437d9a
3 changed files with 9 additions and 370 deletions

View File

@@ -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;
}