C# Class WhiteCore.ScriptEngine.DotNetEngine.CompilerTools.LSL2CSCodeTransformer

ファイルを表示 Open project: WhiteCoreSim/WhiteCore-Dev Class Usage Examples

Public Methods

Method Description
AddLSLEvent ( EventInfo ev ) : void
FixEventName ( string script, ScriptEngineParser.StateEvent &evt ) : void
GetAllLSLEvents ( ) : List
GetNewLSLEvents ( ) : List
LSL2CSCodeTransformer ( SYMBOL astRoot, string originalScript ) : System.Collections.Generic

Pass the new CodeTransformer an abstract syntax tree.

Transform ( ) : SYMBOL

Transform the code in the AST we have.

Transform ( string>.Dictionary GlobalMethods, ObjectList>.Dictionary MethodArguements ) : SYMBOL

Private Methods

Method Description
AddImplicitInitialization ( SYMBOL s, int didx ) : void

Replaces an instance of the node at s.kids[didx] with an assignment node. The assignment node has the Declaration node on the left hand side and a default initializer on the right hand side.

GetLocalVariableDictionaryKey ( ) : string
GetZeroConstant ( Parser p, string constantType ) : SYMBOL

Generates the node structure required to generate a default initialization.

TransformNode ( SYMBOL s, string>.Dictionary GlobalMethods, ObjectList>.Dictionary MethodArguements ) : void

Recursively called to transform each type of node. Will transform this node, then all it's children.

TransformNode ( SYMBOL s, string>.Dictionary GlobalMethods, ObjectList>.Dictionary MethodArguements, List scopesParent, int scopeCurrent ) : void

Recursively called to transform each type of node. Will transform this node, then all it's children.

Method Details

AddLSLEvent() public static method

public static AddLSLEvent ( EventInfo ev ) : void
ev EventInfo
return void

FixEventName() public static method

public static FixEventName ( string script, ScriptEngineParser.StateEvent &evt ) : void
script string
evt ScriptEngineParser.StateEvent
return void

GetAllLSLEvents() public static method

public static GetAllLSLEvents ( ) : List
return List

GetNewLSLEvents() public static method

public static GetNewLSLEvents ( ) : List
return List

LSL2CSCodeTransformer() public method

Pass the new CodeTransformer an abstract syntax tree.
public LSL2CSCodeTransformer ( SYMBOL astRoot, string originalScript ) : System.Collections.Generic
astRoot Tools.SYMBOL The root node of the AST.
originalScript string The original script that we are converting
return System.Collections.Generic

Transform() public method

Transform the code in the AST we have.
public Transform ( ) : SYMBOL
return Tools.SYMBOL

Transform() public method

public Transform ( string>.Dictionary GlobalMethods, ObjectList>.Dictionary MethodArguements ) : SYMBOL
GlobalMethods string>.Dictionary
MethodArguements ObjectList>.Dictionary
return Tools.SYMBOL