![]() |
Zen
A cross-platform functional programming language
|
AST Node representing a list of case labels. More...
#include <Ast.hpp>
Public Types | |
| typedef z::list< CaseLabel * > | List |
| List of case labels. | |
Public Member Functions | |
| SwitchLabelList () | |
| Default constructor. | |
| void | addCase (CaseLabel &label) |
| Add a case label to the list. | |
| void | addDefault (DefaultLabel &label) |
| Set the default case. | |
| const List & | getList () const |
| Returns a reference to the list of labels. | |
| bool | hasDefault () const |
| Checks if list has a default case. | |
| const DefaultLabel & | getDefault () const |
| Returns the default label. | |
Private Attributes | |
| List | _list |
| The Label list. | |
| DefaultLabel * | _defaultLabel |
| The default label. | |
AST Node representing a list of case labels.
| void addCase | ( | CaseLabel & | label | ) | [inline] |
Add a case label to the list.
| label | The case label to add. |
| void addDefault | ( | DefaultLabel & | label | ) | [inline] |
Set the default case.
| label | The label to add. |
| const DefaultLabel& getDefault | ( | ) | const [inline] |
Returns the default label.
| const List& getList | ( | ) | const [inline] |
Returns a reference to the list of labels.
| bool hasDefault | ( | ) | const [inline] |
Checks if list has a default case.