diff options
author | Justin Clark-Casey (justincc) | 2013-11-02 00:39:12 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-11-02 00:39:12 +0000 |
commit | 2b069a3b1ea6750d35e318989c8b982e82adba43 (patch) | |
tree | 54b9490d1247b477c0a9b12fe935f1aa1a002625 /OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs | |
parent | add null check for jpeg2000 sculpt image decode failure. Note: the j2kDecodeC... (diff) | |
download | opensim-SC-2b069a3b1ea6750d35e318989c8b982e82adba43.zip opensim-SC-2b069a3b1ea6750d35e318989c8b982e82adba43.tar.gz opensim-SC-2b069a3b1ea6750d35e318989c8b982e82adba43.tar.bz2 opensim-SC-2b069a3b1ea6750d35e318989c8b982e82adba43.tar.xz |
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.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs | 11 |
1 files changed, 8 insertions, 3 deletions
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 | |||
610 | results = CScodeProvider.CompileAssemblyFromSource( | 610 | results = CScodeProvider.CompileAssemblyFromSource( |
611 | parameters, Script); | 611 | parameters, Script); |
612 | } | 612 | } |
613 | |||
613 | // Deal with an occasional segv in the compiler. | 614 | // Deal with an occasional segv in the compiler. |
614 | // Rarely, if ever, occurs twice in succession. | 615 | // Rarely, if ever, occurs twice in succession. |
615 | // Line # == 0 and no file name are indications that | 616 | // Line # == 0 and no file name are indications that |
@@ -647,15 +648,19 @@ namespace SecondLife | |||
647 | "language type \"" + lang.ToString() + "\""); | 648 | "language type \"" + lang.ToString() + "\""); |
648 | } | 649 | } |
649 | 650 | ||
650 | // Check result | 651 | // foreach (Type type in results.CompiledAssembly.GetTypes()) |
651 | // Go through errors | 652 | // { |
653 | // foreach (MethodInfo method in type.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static)) | ||
654 | // { | ||
655 | // m_log.DebugFormat("[COMPILER]: {0}.{1}", type.FullName, method.Name); | ||
656 | // } | ||
657 | // } | ||
652 | 658 | ||
653 | // | 659 | // |
654 | // WARNINGS AND ERRORS | 660 | // WARNINGS AND ERRORS |
655 | // | 661 | // |
656 | bool hadErrors = false; | 662 | bool hadErrors = false; |
657 | string errtext = String.Empty; | 663 | string errtext = String.Empty; |
658 | |||
659 | if (results.Errors.Count > 0) | 664 | if (results.Errors.Count > 0) |
660 | { | 665 | { |
661 | foreach (CompilerError CompErr in results.Errors) | 666 | foreach (CompilerError CompErr in results.Errors) |