QSCompiler

all the compiler modules wrapped into a single class. This is all that should be needed to compile scripts

Constructors

this
this(Library[] libraries, NaInstruction[] instructionTable)

constructor

Destructor

~this
~this()

destructor

Members

Aliases

checkAST
alias checkAST = finaliseAST

checks and finalises generated AST

Functions

bytecode
QScriptBytecode bytecode()

the generated bytecode. This class will *NOT* be freed by QSCompiler.

errorsClear
void errorsClear()

clears errors

finaliseAST
bool finaliseAST()

checks and finalises generated AST

generateAST
bool generateAST()

generates AST from tokens

generateCode
bool generateCode()

generates bytecode from AST.

generateTokens
bool generateTokens()

generates tokens for a script

loadScript
void loadScript(string[] script)

load a script which is to be compiled.

prettyAST
string prettyAST()

get a JSON representing the generated AST

Properties

errors
CompileError[] errors [@property getter]

what errors occurred

scriptExports
Library scriptExports [@property getter]
Library scriptExports [@property setter]

The Library to which script's exports will be written to

Meta