Zen
A cross-platform functional programming language
|
Concrete AST Node representing a member of a user-defined enumeration. More...
#include <Ast.hpp>
Public Member Functions | |
EnumMemberDef (const AccessType::T &accessType, const z::string &name, const bool &hasInit, const Ast::Expr &initExpr) | |
Default constructor. | |
const bool & | hasInitExpr () const |
Checks whether the enum member has an init expression. | |
const Ast::Expr & | getInitExpr () const |
Returns the initial value expression of the member. | |
Private Member Functions | |
virtual void | visit (TypeSpec::Visitor &visitor) const |
Visitor pattern implementation. | |
Private Attributes | |
const bool | _hasInit |
True if member has an init value, else false. | |
const Ast::Expr & | _initExpr |
A reference to the initial value expression for this member. |
Concrete AST Node representing a member of a user-defined enumeration.
EnumMemberDef | ( | const AccessType::T & | accessType, |
const z::string & | name, | ||
const bool & | hasInit, | ||
const Ast::Expr & | initExpr | ||
) | [inline] |
Default constructor.
accessType | The AccessType for this enum member. |
name | Name of the member |
hasInit | True if the member has an initial value |
initExpr | Expr representing the initial value of the member |
const Ast::Expr& getInitExpr | ( | ) | const [inline] |
Returns the initial value expression of the member.
const bool& hasInitExpr | ( | ) | const [inline] |
Checks whether the enum member has an init expression.
void visit | ( | TypeSpec::Visitor & | visitor | ) | const [private, virtual] |