PyTreeEmitter

Emits a D parse tree as Python code.

Constructors

this
this(Module modul)

Constructs a PyTreeEmitter object.

Members

Functions

emit
char[] emit()

Entry method.

indexOf
char[] indexOf(Token* token)

Returns the index number of a token as a string.

write
void write(Node[] nodes)

Writes the list of nodes separated by commas.

Variables

index
uint[Token*] index;

Map tokens to index numbers.

line
char[] line;

Line buffer.

modul
Module modul;

The module to be processed.

text
char[] text;

Contains the code.

Inherited Members

From Visitor2

dispatch
void dispatch(Node n)

Calls the appropriate visit() method for a node.

dispatch
void dispatch(Node n, NodeKind k)

Allows calling the visit() method with a null node.

unhandled
void unhandled(Node n)

Called by visit() methods that were not overridden.

Meta