C# Класс Axiom.Scripting.Compiler.ScriptCompiler

This is the main class for the compiler. It calls the parser and processes the CST into an AST and then uses translators to translate the AST into the final resources.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Compile ( IList nodes, string group ) : bool
Compile ( IList nodes, string group, bool doImports ) : bool
Compile ( IList nodes, string group, bool doImports, bool doObjects ) : bool
Compile ( IList nodes, string group, bool doImports, bool doObjects, bool doVariables ) : bool

Compiles the given abstract syntax tree

Compile ( String script, String source, String group ) : bool

Takes in a string of script code and compiles it into resources

ScriptCompiler ( ) : System

Приватные методы

Метод Описание
AddError ( CompileErrorCode code, string file, uint line ) : void
AddError ( CompileErrorCode code, string file, uint line, string msg ) : void

Adds the given error to the compiler's list of errors

Compile ( IList nodes, string group ) : bool

Compiles resources from the given concrete node list

InitializeWordMap ( ) : void
_convertToAST ( IList nodes ) : IList
_fireEvent ( ScriptCompilerEvent &evt ) : bool
_fireEvent ( ScriptCompilerEvent &evt, object &retVal ) : bool

Internal method for firing the handleEvent method

_isNameExcluded ( string cls, AbstractNode parent ) : bool

Returns true if the given class is name excluded

_loadImportPath ( string name ) : IList

Loads the requested script and converts it to an AST

_locateTarget ( IList nodes, string target ) : List

Returns the abstract nodes from the given tree which represent the target

_overlayObject ( AbstractNode source, Axiom.Scripting.Compiler.AST.ObjectAbstractNode dest ) : void
_processImports ( IList &nodes ) : void

This built-in function processes import nodes

_processObjects ( IList &nodes, IList top ) : void

Handles object inheritance and variable expansion

_processVariables ( IList &nodes ) : void

Handles processing the variables

Описание методов

Compile() публичный Метод

public Compile ( IList nodes, string group ) : bool
nodes IList
group string
Результат bool

Compile() публичный Метод

public Compile ( IList nodes, string group, bool doImports ) : bool
nodes IList
group string
doImports bool
Результат bool

Compile() публичный Метод

public Compile ( IList nodes, string group, bool doImports, bool doObjects ) : bool
nodes IList
group string
doImports bool
doObjects bool
Результат bool

Compile() публичный Метод

Compiles the given abstract syntax tree
public Compile ( IList nodes, string group, bool doImports, bool doObjects, bool doVariables ) : bool
nodes IList
group string
doImports bool
doObjects bool
doVariables bool
Результат bool

Compile() публичный Метод

Takes in a string of script code and compiles it into resources
public Compile ( String script, String source, String group ) : bool
script String The script code
source String The source of the script code (e.g. a script file)
group String The resource group to place the compiled resources into
Результат bool

ScriptCompiler() публичный Метод

public ScriptCompiler ( ) : System
Результат System