Class: Code

Eleven~ Code

Base class for code generation.


new Code()

Properties:
Name Type Description
Machine Object

stack machine generator class.

machine module:Six~Machine10

stack machine to generate code for.

Source:

Extends

Members


Instructions

Extended stack machine instructions.

Source:

Machine

Stack machine generator class.

Source:

executable

The executable.

Source:

machine

Stack machine generator.

Source:

Methods


_dump(node [, shallow])

Creates a deep display of a node.

Parameters:
Name Type Argument Description
node Array

to recursively traverse.

shallow number <optional>

limits depth if non-negative, by default unlimited.

Inherited From:
Source:

_error()

Displays and counts an error message.

Inherited From:
Source:

_postfix(op)

Visits the subtrees and generates an instruction.

Parameters:
Name Type Description
op string

instruction name.

Source:
Returns:

end of code memory.

Type
number

_tree(node)

Recursively checks tree tags, throws an error if there is a problem.

Parameters:
Name Type Description
node Array

to validate.

Inherited From:
Source:

visit(node [, trace])

Visits a (valid!) tree node, returns either node itself or the result of calling tag as method for an array.

Parameters:
Name Type Argument Description
node Array

to visit, using the tag as a method name and the node as argument.

trace RegExp <optional>

sets .trace if specified.

Inherited From:
Source: