Zen
A cross-platform functional programming language
|
Base node class for list and map of variable definitions. More...
#include <Ast.hpp>
Public Types | |
typedef z::list< const VariableDef * > | List |
Default list of VariableDef nodes This is different from Ast::VariableDef::List in that it stores const pointers whereas those are non-const pointers. | |
Public Member Functions | |
const List & | getList () const |
Returns a reference to the VariableDef list. | |
const VariableDef & | getFirst () const |
Returns the first VariableDef in the list. | |
const VariableDef & | getLast () const |
Returns the last VariableDef in the list. | |
const Ast::VariableDef & | addDef (const Ast::VariableDef &child) |
Adds a VariableDef to the list. | |
Protected Member Functions | |
VariableDefListBase () | |
Default constructor. | |
Private Attributes | |
List | _list |
The VariableDef list managed by this class. |
Base node class for list and map of variable definitions.
It is necessary to store lists of VariableDef instances at various places in the AST. This is a convenience class node for such lists.
const Ast::VariableDef& addDef | ( | const Ast::VariableDef & | child | ) | [inline] |
Adds a VariableDef to the list.
child | VariableDef to add |
Reimplemented in VariableDefMap.
const VariableDef& getFirst | ( | ) | const [inline] |
Returns the first VariableDef in the list.
const VariableDef& getLast | ( | ) | const [inline] |
Returns the last VariableDef in the list.
const List& getList | ( | ) | const [inline] |
Returns a reference to the VariableDef list.