MacroTable

Maps macro names to Macro objects.

MacroTables can be chained so that they build a linear hierarchy. Macro definitions in the current table override the ones in the parent tables.

Constructors

this
this(MacroTable parent = null)

Constructs a MacroTable instance.

Members

Functions

insert
void insert(Macro m, bool convertText = true)

Inserts the macro m into the table. Overwrites the current macro if one exists.

insert
void insert(Macro[] macros)

Inserts an array of macros into the table.

insert
void insert(cstring name, cstring text)

Creates a macro using name and text and inserts it into the table.

insert
void insert(cstring[] names, cstring[] texts)

Creates a macro using namen and textn pairs and inserts it into the table.

isRoot
bool isRoot()
search
Macro search(cstring name)

Searches for a macro.

Variables

parent
MacroTable parent;

The parent in the hierarchy. Or null if this is the root.

table
Macro[hash_t] table;

The associative array that holds the macro definitions.

Meta