Zen
A cross-platform functional programming language
|
Concrete class for AST Node representing a reference to an enum member. More...
#include <Ast.hpp>
Public Member Functions | |
EnumRefExpr (const QualifiedType &type, const Ast::EnumDef &enumDef, const z::string &id) | |
Default constructor. | |
const EnumDef & | getEnumDef () const |
Returns the refered enum. | |
const z::string & | getId () const |
Returns the referred member id. | |
Private Member Functions | |
virtual void | visit (Expr::Visitor &visitor) const |
Abstract visitor function. | |
Private Attributes | |
const EnumDef & | _enumDef |
const z::string | _id |
Concrete class for AST Node representing a reference to an enum member.
For example:
enum OpenMode {Read, Write};
local y = OpenMode.Read;
Here, y is assigned the value of OpenMode.Read.
EnumRefExpr | ( | const QualifiedType & | type, |
const Ast::EnumDef & | enumDef, | ||
const z::string & | id | ||
) | [inline] |
const EnumDef& getEnumDef | ( | ) | const [inline] |
Returns the refered enum.
const z::string& getId | ( | ) | const [inline] |
Returns the referred member id.
void visit | ( | Expr::Visitor & | visitor | ) | const [private, virtual] |