mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 14:16:07 +08:00
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.
This commit is contained in:
@@ -27,12 +27,16 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using Tools;
|
||||
|
||||
namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
|
||||
{
|
||||
public class LSL2CSCodeTransformer
|
||||
{
|
||||
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private SYMBOL m_astRoot = null;
|
||||
private static Dictionary<string, string> m_datatypeLSL2OpenSim = null;
|
||||
|
||||
@@ -78,6 +82,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
|
||||
/// <param name="s">The current node to transform.</param>
|
||||
private void TransformNode(SYMBOL s)
|
||||
{
|
||||
// m_log.DebugFormat("[LSL2CSCODETRANSFORMER]: Tranforming node {0}", s);
|
||||
|
||||
// make sure to put type lower in the inheritance hierarchy first
|
||||
// ie: since IdentConstant and StringConstant inherit from Constant,
|
||||
// put IdentConstant and StringConstant before Constant
|
||||
@@ -103,10 +109,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
|
||||
// We need to check for that here.
|
||||
if (null != s.kids[i])
|
||||
{
|
||||
// m_log.Debug("[LSL2CSCODETRANSFORMER]: Moving down level");
|
||||
|
||||
if (!(s is Assignment || s is ArgumentDeclarationList) && s.kids[i] is Declaration)
|
||||
AddImplicitInitialization(s, i);
|
||||
|
||||
TransformNode((SYMBOL) s.kids[i]);
|
||||
|
||||
// m_log.Debug("[LSL2CSCODETRANSFORMER]: Moving up level");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user