aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/CodeTools/LSL2CSCodeTransformer.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-11-02 00:39:12 +0000
committerJustin Clark-Casey (justincc)2013-11-02 00:39:12 +0000
commit2b069a3b1ea6750d35e318989c8b982e82adba43 (patch)
tree54b9490d1247b477c0a9b12fe935f1aa1a002625 /OpenSim/Region/ScriptEngine/Shared/CodeTools/LSL2CSCodeTransformer.cs
parentadd null check for jpeg2000 sculpt image decode failure. Note: the j2kDecodeC... (diff)
downloadopensim-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 'OpenSim/Region/ScriptEngine/Shared/CodeTools/LSL2CSCodeTransformer.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/LSL2CSCodeTransformer.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/LSL2CSCodeTransformer.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/LSL2CSCodeTransformer.cs
index e77b3d2..0fb3574 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/LSL2CSCodeTransformer.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/LSL2CSCodeTransformer.cs
@@ -27,12 +27,16 @@
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection;
31using log4net;
30using Tools; 32using Tools;
31 33
32namespace OpenSim.Region.ScriptEngine.Shared.CodeTools 34namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
33{ 35{
34 public class LSL2CSCodeTransformer 36 public class LSL2CSCodeTransformer
35 { 37 {
38// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
39
36 private SYMBOL m_astRoot = null; 40 private SYMBOL m_astRoot = null;
37 private static Dictionary<string, string> m_datatypeLSL2OpenSim = null; 41 private static Dictionary<string, string> m_datatypeLSL2OpenSim = null;
38 42
@@ -78,6 +82,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
78 /// <param name="s">The current node to transform.</param> 82 /// <param name="s">The current node to transform.</param>
79 private void TransformNode(SYMBOL s) 83 private void TransformNode(SYMBOL s)
80 { 84 {
85// m_log.DebugFormat("[LSL2CSCODETRANSFORMER]: Tranforming node {0}", s);
86
81 // make sure to put type lower in the inheritance hierarchy first 87 // make sure to put type lower in the inheritance hierarchy first
82 // ie: since IdentConstant and StringConstant inherit from Constant, 88 // ie: since IdentConstant and StringConstant inherit from Constant,
83 // put IdentConstant and StringConstant before Constant 89 // put IdentConstant and StringConstant before Constant
@@ -103,10 +109,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
103 // We need to check for that here. 109 // We need to check for that here.
104 if (null != s.kids[i]) 110 if (null != s.kids[i])
105 { 111 {
112// m_log.Debug("[LSL2CSCODETRANSFORMER]: Moving down level");
113
106 if (!(s is Assignment || s is ArgumentDeclarationList) && s.kids[i] is Declaration) 114 if (!(s is Assignment || s is ArgumentDeclarationList) && s.kids[i] is Declaration)
107 AddImplicitInitialization(s, i); 115 AddImplicitInitialization(s, i);
108 116
109 TransformNode((SYMBOL) s.kids[i]); 117 TransformNode((SYMBOL) s.kids[i]);
118
119// m_log.Debug("[LSL2CSCODETRANSFORMER]: Moving up level");
110 } 120 }
111 } 121 }
112 } 122 }