![]() |
Zen
A cross-platform functional programming language
|
Base node class for list and map of variable references. More...
#include <Ast.hpp>
Public Types | |
|
typedef z::list< const VariableRef * > | List |
| Default list of VariableRef nodes. | |
Public Member Functions | |
| VariableRefList () | |
| Default constructor. | |
| const List & | getList () const |
| Returns a reference to the VariableRef list. | |
| const Ast::VariableRef & | addRef (const Ast::VariableRef &vref) |
| Adds a VariableDef to the list. | |
| bool | hasRef (const Ast::VariableRef &vref) const |
| Checks if a VariableRef exists in the list. | |
| void | appendList (const VariableRefList &src) |
| Appends a VariableRef list to the current list. | |
Private Attributes | |
| List | _list |
| The VariableRef list managed by this class. | |
Base node class for list and map of variable references.
At various places in the AST, it is necessary to store list of variable references. This is a convenience class node for such lists.
| const Ast::VariableRef& addRef | ( | const Ast::VariableRef & | vref | ) | [inline] |
Adds a VariableDef to the list.
| vref | VariableDef to add |
| void appendList | ( | const VariableRefList & | src | ) | [inline] |
Appends a VariableRef list to the current list.
| src | The list to be appended |
| const List& getList | ( | ) | const [inline] |
Returns a reference to the VariableRef list.
| bool hasRef | ( | const Ast::VariableRef & | vref | ) | const [inline] |
Checks if a VariableRef exists in the list.
| vref | The item to be checked |