The AttribExpr class represents attributes which resolve to values. More...
#include <AttribExpr.h>
Public Member Functions | |
const Ast * | getPrefix () const |
Returns the prefix to which this attribute applies. | |
Ast * | getPrefix () |
attrib::AttributeID | getAttributeID () const |
Returns the AttributeID associated with this expression. | |
Static Public Member Functions | |
static bool | classof (const AttribExpr *node) |
Support isa and dyn_cast. | |
static bool | classof (const Ast *node) |
Protected Member Functions | |
AttribExpr (AstKind kind, Ast *prefix, PrimaryType *type, Location loc) | |
Constructs an AttribExpr when the type of the attribute is known. | |
AttribExpr (AstKind kind, Ast *prefix, Location loc) | |
Static Protected Member Functions | |
static attrib::AttributeID | correspondingID (AstKind kind) |
Protected Attributes | |
Ast * | prefix |
The AttribExpr class represents attributes which resolve to values.
Definition at line 27 of file AttribExpr.h.
comma::AttribExpr::AttribExpr | ( | AstKind | kind, | |
Ast * | prefix, | |||
PrimaryType * | type, | |||
Location | loc | |||
) | [inline, protected] |
Constructs an AttribExpr when the type of the attribute is known.
Definition at line 50 of file AttribExpr.h.
Constructs an AttribExpr when the exact type is not available. Subclasses should call Expr::setType to resolve the type when available.
Definition at line 60 of file AttribExpr.h.
static bool comma::AttribExpr::classof | ( | const Ast * | node | ) | [inline, static] |
Reimplemented from comma::Expr.
Reimplemented in comma::ScalarBoundAE, comma::FirstAE, comma::LastAE, comma::ArrayBoundAE, comma::FirstArrayAE, and comma::LastArrayAE.
Definition at line 44 of file AttribExpr.h.
static bool comma::AttribExpr::classof | ( | const AttribExpr * | node | ) | [inline, static] |
Support isa and dyn_cast.
Reimplemented from comma::Expr.
Reimplemented in comma::ScalarBoundAE, comma::FirstAE, comma::LastAE, comma::ArrayBoundAE, comma::FirstArrayAE, and comma::LastArrayAE.
Definition at line 43 of file AttribExpr.h.
attrib::AttributeID AttribExpr::correspondingID | ( | AstKind | kind | ) | [static, protected] |
Returns the AttributeID which corresponds to the given AstKind, or attrib::UNKNOWN_ATTRIB if there is no mapping.
Definition at line 16 of file AttribExpr.cpp.
attrib::AttributeID comma::AttribExpr::getAttributeID | ( | ) | const [inline] |
Returns the AttributeID associated with this expression.
Definition at line 37 of file AttribExpr.h.
Ast* comma::AttribExpr::getPrefix | ( | ) | [inline] |
Reimplemented in comma::ScalarBoundAE, and comma::ArrayBoundAE.
Definition at line 34 of file AttribExpr.h.
const Ast* comma::AttribExpr::getPrefix | ( | ) | const [inline] |
Returns the prefix to which this attribute applies.
The returned node is either a TypeRef, SubroutineRef, or an Expr.
Reimplemented in comma::ScalarBoundAE, and comma::ArrayBoundAE.
Definition at line 33 of file AttribExpr.h.
Ast* comma::AttribExpr::prefix [protected] |
Definition at line 72 of file AttribExpr.h.