LRDE Tiger Compiler
1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
|
Abstract a "list of D-declarations" node. More...
#include <any-decs.hh>
Public Types | |
typedef std::list< D * > | Ds |
Define shorthand type for list of D-declarations. |
Public Member Functions | |
Ctor & dtor. | |
AnyDecs (const Location &location, Ds *decs) | |
Construct an AnyDecs node with a list of D-declarations. | |
AnyDecs (const Location &location) | |
~AnyDecs () | |
Destroys an AnyDecs node. | |
Visitors entry point. | |
virtual void | accept (Visitor &v) override |
Accept a const visitor v. | |
virtual void | accept (ConstVisitor &v) const override |
Accept a non-const visitor v. | |
Accessors. | |
AnyDecs< D > & | push_front (D &d) |
Push d in front. | |
AnyDecs< D > & | push_back (D &d) |
Push d in back. | |
Ds & | decs_get () |
Access to list of D-declarations (read and write). | |
const Ds & | decs_get () const |
Access to list of D-declarations (read only). | |
Accessors. | |
const Location & | location_get () const |
Return scanner position information. | |
void | location_set (const Location &) |
Set scanner position information. |
Protected Attributes | |
Location | location_ |
Scanner position information. |
Private Attributes | |
Ds * | decs_ = new Ds() |
Abstract a "list of D-declarations" node.
typedef std::list<D*> ast::AnyDecs< D >::Ds |
Define shorthand type for list of D-declarations.
ast::AnyDecs< D >::AnyDecs | ( | const Location & | location, |
Ds * | decs | ||
) |
Construct an AnyDecs node with a list of D-declarations.
location | scanner position informations |
decs | list of D-declarations |
ast::AnyDecs< D >::AnyDecs | ( | const Location & | location | ) |
ast::AnyDecs< D >::~AnyDecs | ( | ) |
Destroys an AnyDecs node.
Free list and its content.
|
inlineoverridevirtual |
Accept a const visitor v.
Implements ast::Ast.
|
inlineoverridevirtual |
Accept a non-const visitor v.
Implements ast::Ast.
|
inline |
Access to list of D-declarations (read and write).
Referenced by object::DesugarVisitor::dispatch_switch(), callgraph::CallGraphVisitor::operator()(), object::DesugarVisitor::operator()(), object::TypeChecker::operator()(), translate::Translator::operator()(), type::TypeChecker::type(), and translate::Translator::visit_function_dec_body().
|
inline |
Access to list of D-declarations (read only).
|
inlineinherited |
Return scanner position information.
References ast::Ast::location_.
Referenced by type::TypeChecker::error(), object::DesugarVisitor::operator()(), astclone::Cloner::operator()(), ast::DecsList::push_back(), ast::DecsList::push_front(), and type::TypeChecker::type_mismatch().
|
inlineinherited |
Set scanner position information.
References ast::Ast::location_.
AnyDecs< D > & ast::AnyDecs< D >::push_back | ( | D & | d | ) |
Push d in back.
d | declaration to push |
AnyDecs< D > & ast::AnyDecs< D >::push_front | ( | D & | d | ) |
Push d in front.
d | declaration to push |
|
private |
|
protectedinherited |
Scanner position information.
Referenced by ast::Ast::location_get(), ast::Ast::location_set(), ast::DecsList::push_back(), and ast::DecsList::push_front().