If first 4 characters in script is "//C#" script will be treated as pure C# instead of LSL/C# hybrid. This means no preprocessing before compile.

afrisby
Tedd Hansen 2007-09-13 14:15:02 +00:00
parent 888133e987
commit 0709d96716
1 changed files with 9 additions and 2 deletions

View File

@ -36,9 +36,16 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
/// <param name="Script">LSL script</param> /// <param name="Script">LSL script</param>
/// <returns>Filename to .dll assembly</returns> /// <returns>Filename to .dll assembly</returns>
public string CompileFromLSLText(string Script) public string CompileFromLSLText(string Script)
{
if (Script.Substring(0, 4).ToLower() == "//c#")
{
return LSL_Converter.Convert(Script);
}
else
{ {
return CompileFromCSText(LSL_Converter.Convert(Script)); return CompileFromCSText(LSL_Converter.Convert(Script));
} }
}
/// <summary> /// <summary>
/// Compile CS script to .Net assembly (.dll) /// Compile CS script to .Net assembly (.dll)
/// </summary> /// </summary>