Patch from Mike: errors from the LSL/C# compilers are now reported to the user in-world

This commit is contained in:
Johan Berntsson
2008-07-10 05:40:45 +00:00
parent 38da8960e9
commit d41c1f40a8
3 changed files with 33 additions and 2 deletions

View File

@@ -43,7 +43,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
/// <param name="script">String containing LSL source.</param>
public CSCodeGenerator(string script)
{
Parser p = new LSLSyntax();
Parser p = new LSLSyntax(new yyLSLSyntax(), new ErrorHandler(true));
// Obviously this needs to be in a try/except block.
LSL2CSCodeTransformer codeTransformer = new LSL2CSCodeTransformer(p.Parse(script));
m_astRoot = codeTransformer.Transform();