ExprBytecode

Create a bytecode from the list of AST trees. The resulting bytecode will be the bytecode of each AST concatenated.

Constructor

new L3D.ExprBytecode(ast)

Parameters
ast ExprAST

Properties

Is this bytecode valid?

Methods

_generateBytecode()

Generate the bytecode for an AST.

eval()

Evaluate the expression bytecode with the given context. As an optimization, it will hang on to the last [context] used to evaluate the expression. It looks up all of the symbols that are used by the expression, and finds them in the context. If the context has new symbols since the last time it was evaluated, those won't be picked up and you should use a new context.

toString()

Convert the bytecode to a string, for debugging.