From 2b069a3b1ea6750d35e318989c8b982e82adba43 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 2 Nov 2013 00:39:12 +0000 Subject: If the LSL state_entry() event definition contains any parameters, then generate syntax error as seen on the LL grid This is done through the parser and so generates the same syntax error message if any parameters are wrongly specified for this event. We were already enforcing event names in the parser. This is only for state_entry so far as an initial test of the approach - appears to work correctly. --- OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs') diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs index b71afe3..87f7189 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs @@ -610,6 +610,7 @@ namespace SecondLife results = CScodeProvider.CompileAssemblyFromSource( parameters, Script); } + // Deal with an occasional segv in the compiler. // Rarely, if ever, occurs twice in succession. // Line # == 0 and no file name are indications that @@ -647,15 +648,19 @@ namespace SecondLife "language type \"" + lang.ToString() + "\""); } - // Check result - // Go through errors +// foreach (Type type in results.CompiledAssembly.GetTypes()) +// { +// foreach (MethodInfo method in type.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static)) +// { +// m_log.DebugFormat("[COMPILER]: {0}.{1}", type.FullName, method.Name); +// } +// } // // WARNINGS AND ERRORS // bool hadErrors = false; string errtext = String.Empty; - if (results.Errors.Count > 0) { foreach (CompilerError CompErr in results.Errors) -- cgit v1.1