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

This is a listener for the compiler. The compiler can be customized with this listener. It lets you listen in on events occuring during compilation, hook them, and change the behavior.
Показать файл Открыть проект

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

Метод Описание
HandleError ( ScriptCompiler compiler, ScriptCompiler err ) : void

Called when an error occurred

HandleEvent ( ScriptCompiler compiler, ScriptCompilerEvent &evt, object &retVal ) : bool

Called when an event occurs during translation, return true if handled

This function is called from the translators when an event occurs that that can be responded to. Often this is overriding names, or it can be a request for custom resource creation.

ImportFile ( ScriptCompiler compiler, String name ) : IList

Returns the concrete node list from the given file

PostConversion ( ScriptCompiler compiler, IList nodes ) : bool

Allows vetoing of continued compilation after the entire AST conversion process finishes

Once the script is turned completely into an AST, including import and override handling, this function allows a listener to exit the compilation process.

PreConversion ( ScriptCompiler compiler, IList nodes ) : void

Allows for responding to and overriding behavior before a CST is translated into an AST

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

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

Called when an error occurred
public HandleError ( ScriptCompiler compiler, ScriptCompiler err ) : void
compiler ScriptCompiler A reference to the compiler
err ScriptCompiler
Результат void

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

Called when an event occurs during translation, return true if handled
This function is called from the translators when an event occurs that that can be responded to. Often this is overriding names, or it can be a request for custom resource creation.
public HandleEvent ( ScriptCompiler compiler, ScriptCompilerEvent &evt, object &retVal ) : bool
compiler ScriptCompiler A reference to the compiler
evt ScriptCompilerEvent The event object holding information about the event to be processed
retVal object A possible return value from handlers
Результат bool

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

Returns the concrete node list from the given file
public ImportFile ( ScriptCompiler compiler, String name ) : IList
compiler ScriptCompiler A reference to the compiler
name String
Результат IList

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

Allows vetoing of continued compilation after the entire AST conversion process finishes
Once the script is turned completely into an AST, including import and override handling, this function allows a listener to exit the compilation process.
public PostConversion ( ScriptCompiler compiler, IList nodes ) : bool
compiler ScriptCompiler A reference to the compiler
nodes IList
Результат bool

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

Allows for responding to and overriding behavior before a CST is translated into an AST
public PreConversion ( ScriptCompiler compiler, IList nodes ) : void
compiler ScriptCompiler A reference to the compiler
nodes IList
Результат void