Свойство | Тип | Описание | |
---|---|---|---|
LocalMethodArguements | ObjectList>.Dictionary | ||
LocalMethods | string>.Dictionary |
Метод | Описание | |
---|---|---|
CSCodeGenerator ( |
Creates an 'empty' CSCodeGenerator instance.
|
|
Convert ( string script ) : string |
Generate the code from the AST we have.
|
|
CreateCompilerScript ( |
||
Dispose ( ) : void | ||
GetHeaderCount ( |
Метод | Описание | |
---|---|---|
AddWarning ( string warning ) : void | ||
CheckEvent ( string script, string state ) : void | ||
CheckEventCasts ( string script ) : void |
Checks the C# script for the correct casts in events This stops errors from misformed events ex. 'touch(vector3 position)' instead of 'touch(int touch)'
|
|
CheckFloatExponent ( string script ) : string | ||
CheckForInlineVectors ( string script ) : string | ||
CheckIfGlobalVariable ( string varName, string type, |
||
CheckName ( string s ) : string |
Returns the passed name with an underscore prepended if that name is a reserved word in C# and not reserved in LSL otherwise it just returns the passed name. This makes no attempt to cache the results to minimise future lookups. For a non trivial scripts the number of unique identifiers could easily grow to the size of the reserved word list so maintaining a list or dictionary and doing the lookup there firstwould probably not give any real speed advantage. I believe there is a class Microsoft.CSharp.CSharpCodeProvider that has a function CreateValidIdentifier(str) that will return either the value of str if it is not a C# key word or "_"+str if it is. But availability under Mono?
|
|
DumpAfterFunc ( bool marc ) : string | ||
DumpFunc ( bool marc ) : string | ||
FindLineNumbers ( string EventName, string Problem ) : void | ||
FindWrongParameterCountLineNumbers ( string EventName, int correct, int i ) : void | ||
FixAdditionalEvents ( string script ) : string | ||
FuncCallsMarc ( ) : bool | ||
Generate ( string s ) : string |
Prints text.
|
|
Generate ( string s, |
Prints text.
|
|
GenerateArgumentDeclarationList ( ScriptEngineParser.ArgumentDeclarationList adl ) : string |
Generates the code for an ArgumentDeclarationList node.
|
|
GenerateArgumentList ( ScriptEngineParser.ArgumentList al ) : string |
Generates the code for an ArgumentList node.
|
|
GenerateAssignment ( ScriptEngineParser.Assignment a ) : string |
Generates the code for an Assignment node.
|
|
GenerateBinaryExpression ( ScriptEngineParser.BinaryExpression be, bool isUnaryExpression, string addition ) : string |
Generates the code for a BinaryExpression node.
|
|
GenerateCompoundStatement ( ScriptEngineParser.CompoundStatement cs ) : string |
Generates the code for a CompoundStatement node.
|
|
GenerateConstant ( ScriptEngineParser.Constant c ) : string |
Generates the code for a Constant node.
|
|
GenerateDeclaration ( ScriptEngineParser.Declaration d ) : string |
Generates the code for a Declaration node.
|
|
GenerateDoWhileStatement ( ScriptEngineParser.DoWhileStatement dws ) : string |
Generates the code for a DoWhileStatement node.
|
|
GenerateFireEventMethod ( ) : string | ||
GenerateForLoop ( ScriptEngineParser.ForLoop fl ) : string |
Generates the code for a ForLoop node.
|
|
GenerateForLoopStatement ( ScriptEngineParser.ForLoopStatement fls ) : string |
Generates the code for a ForLoopStatement node.
|
|
GenerateFunctionCall ( ScriptEngineParser.FunctionCall fc, bool NeedRetVal ) : string |
Generates the code for a FunctionCall node.
|
|
GenerateGlobalFunctionDefinition ( ScriptEngineParser.GlobalFunctionDefinition gf ) : string |
Generates the code for a GlobalFunctionDefinition node.
|
|
GenerateGlobalVariableDeclaration ( ScriptEngineParser.GlobalVariableDeclaration gv ) : string |
Generates the code for a GlobalVariableDeclaration node.
|
|
GenerateIfStatement ( ScriptEngineParser.IfStatement ifs ) : string |
Generates the code for an IfStatement node.
|
|
GenerateIncrementDecrementExpression ( ScriptEngineParser.IncrementDecrementExpression ide ) : string |
Generates the code for a IncrementDecrementExpression node.
|
|
GenerateIndented ( string s, |
Prints text correctly indented.
|
|
GenerateIndentedLine ( string s ) : string |
Prints text correctly indented, followed by a newline.
|
|
GenerateIndentedLine ( string s, |
Prints text correctly indented, followed by a newline.
|
|
GenerateJumpLabel ( ScriptEngineParser.JumpLabel jl ) : string |
Generates the code for a JumpLabel node.
|
|
GenerateJumpStatement ( ScriptEngineParser.JumpStatement js ) : string |
Generates the code for a JumpStatement node.
|
|
GenerateLine ( ) : string |
Prints a newline.
|
|
GenerateLine ( string s ) : string |
Prints text, followed by a newline.
|
|
GenerateLine ( string s, |
Prints text, followed by a newline.
|
|
GenerateListConstant ( ScriptEngineParser.ListConstant lc ) : string |
Generates the code for a ListConstant node.
|
|
GenerateNode ( |
Recursively called to generate each type of node. Will generate this node, then all it's children.
|
|
GenerateParenthesisExpression ( ScriptEngineParser.ParenthesisExpression pe ) : string |
Generates the code for a ParenthesisExpression node.
|
|
GenerateReturnStatement ( ScriptEngineParser.ReturnStatement rs ) : string |
Generates the code for a ReturnStatement node.
|
|
GenerateRotationConstant ( ScriptEngineParser.RotationConstant rc ) : string |
Generates the code for a RotationConstant node.
|
|
GenerateState ( ScriptEngineParser.State s ) : string |
Generates the code for a State node.
|
|
GenerateStateChange ( ScriptEngineParser.StateChange sc ) : string |
Generates the code for a StateChange node.
|
|
GenerateStateEvent ( ScriptEngineParser.StateEvent se, string parentStateName ) : string |
Generates the code for a StateEvent node.
|
|
GenerateStatement ( ScriptEngineParser.Statement s ) : string |
Generates the code for a Statement node.
|
|
GenerateTypecastExpression ( ScriptEngineParser.TypecastExpression te ) : string |
Generates the code for a TypecastExpression node.
|
|
GenerateUnaryExpression ( ScriptEngineParser.UnaryExpression ue ) : string |
Generates the code for a UnaryExpression node.
|
|
GenerateVectorConstant ( ScriptEngineParser.VectorConstant vc ) : string |
Generates the code for a VectorConstant node.
|
|
GenerateWhileStatement ( ScriptEngineParser.WhileStatement ws ) : string |
Generates the code for a WhileStatement node.
|
|
GetLocalDeclarationKey ( ) : string | ||
GetValue ( ScriptEngineParser.Constant identEx ) : string | ||
Indent ( ) : string |
Prints correct indentation.
|
|
ResetCounters ( ) : void |
Resets various counters and metadata.
|
|
checkForMultipleAssignments ( List |
public CSCodeGenerator ( |
||
compiler | ||
Результат | System |
public Convert ( string script ) : string | ||
script | string | The LSL source as a string. |
Результат | string |
public static CreateCompilerScript ( |
||
compiler | ||
MethodsToAdd | List |
|
ScriptClass | string | |
Результат | string |
public static GetHeaderCount ( |
||
compiler | ||
Результат | int |
public Dictionary |
||
Результат | ObjectList>.Dictionary |