LRDE Tiger Compiler
1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
|
#include <subscript-var.hh>
Public Member Functions | |
Ctor & dtor. | |
SubscriptVar (const Location &location, Var *var, Exp *index) | |
Construct a SubscriptVar node. | |
virtual | ~SubscriptVar () |
Destroy a SubscriptVar node. | |
Visitors entry point. | |
virtual void | accept (ConstVisitor &v) const override |
Accept a const visitor v. | |
virtual void | accept (Visitor &v) override |
Accept a non-const visitor v. | |
Accessors. | |
const Var & | var_get () const |
Return the mother variable. | |
Var & | var_get () |
Return the mother variable. | |
const Exp & | index_get () const |
Return the offset expression. | |
Exp & | index_get () |
Return the offset expression. |
Protected Attributes | |
Var * | var_ |
The mother variable. | |
Exp * | index_ |
The offset expression. |
Construct a SubscriptVar node.
|
virtual |
Destroy a SubscriptVar node.
|
overridevirtual |
Accept a const visitor v.
|
overridevirtual |
Accept a non-const visitor v.
|
inline |
Return the offset expression.
References index_.
Referenced by ast::PrettyPrinter::operator()(), and astclone::Cloner::operator()().
|
inline |
Return the mother variable.
References var_.
Referenced by ast::PrettyPrinter::operator()(), and astclone::Cloner::operator()().
|
inline |
Return the mother variable.
References var_.
|
protected |
The offset expression.
Referenced by index_get(), and ~SubscriptVar().
|
protected |
The mother variable.
Referenced by var_get(), and ~SubscriptVar().