|
LRDE Tiger Compiler
1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
|
Method declaration. More...
#include <method-dec.hh>


Public Member Functions | |
| std::list< bool > | escapes_get () const |
| Return the list of the escapes. | |
Ctor & dtor. | |
| MethodDec (const Location &location, const misc::symbol &name, VarDecs *formals, NameTy *result, Exp *body) | |
| Construct a MethodDec node. | |
| virtual | ~MethodDec () |
| Destroy a MethodDec 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 VarDecs & | formals_get () const |
| Return formal arguments. | |
| VarDecs & | formals_get () |
| Return formal arguments. | |
| const NameTy * | result_get () const |
| Return result type. | |
| NameTy * | result_get () |
| Return result type. | |
| const Exp * | body_get () const |
| Return instructions. | |
| Exp * | body_get () |
| Return instructions. | |
| void | body_set (Exp *) |
| Set instructions. | |
Accessors. | |
| const misc::symbol & | name_get () const |
| Return name of the defined entity. | |
| void | name_set (const misc::symbol &) |
| Set name of the defined entity. | |
Accessors. | |
| const Location & | location_get () const |
| Return scanner position information. | |
| void | location_set (const Location &) |
| Set scanner position information. | |
Protected Attributes | |
| VarDecs * | formals_ |
| Formal arguments. | |
| NameTy * | result_ |
| Result type. | |
| Exp * | body_ |
| Instructions. | |
| misc::symbol | name_ |
| Name of the defined entity. | |
| Location | location_ |
| Scanner position information. | |
Method declaration.
A method declaration is not a function in the strict sense of object-oriented programming. Inheritance is used as a factoring tool here.
| ast::MethodDec::MethodDec | ( | const Location & | location, |
| const misc::symbol & | name, | ||
| VarDecs * | formals, | ||
| NameTy * | result, | ||
| Exp * | body | ||
| ) |
Construct a MethodDec node.
|
virtual |
Destroy a MethodDec node.
|
overridevirtual |
Accept a const visitor v.
Reimplemented from ast::FunctionDec.
|
overridevirtual |
Accept a non-const visitor v.
Reimplemented from ast::FunctionDec.
|
inlineinherited |
Return instructions.
References ast::FunctionDec::body_.
Referenced by object::DesugarVisitor::operator()(), astclone::Cloner::operator()(), translate::Translator::visit_function_dec_body(), and translate::Translator::visit_function_dec_header().
|
inlineinherited |
Return instructions.
References ast::FunctionDec::body_.
|
inlineinherited |
Set instructions.
References ast::FunctionDec::body_.
|
inlineinherited |
Return the list of the escapes.
Referenced by translate::Translator::visit_function_dec_header().
|
inlineinherited |
Return formal arguments.
References ast::FunctionDec::formals_.
Referenced by object::DesugarVisitor::dispatch_switch(), object::DesugarVisitor::operator()(), astclone::Cloner::operator()(), and translate::Translator::visit_function_dec_body().
|
inlineinherited |
Return formal arguments.
References ast::FunctionDec::formals_.
|
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_.
|
inlineinherited |
Return name of the defined entity.
References ast::Dec::name_.
Referenced by type::Attribute::name_get(), object::DesugarVisitor::operator()(), astclone::Cloner::operator()(), object::TypeChecker::operator()(), overload::Binder::visit_dec_header(), object::TypeChecker::visit_dec_header(), and translate::Translator::visit_function_dec_header().
|
inlineinherited |
Set name of the defined entity.
References ast::Dec::name_.
|
inlineinherited |
Return result type.
References ast::FunctionDec::result_.
Referenced by object::DesugarVisitor::operator()(), astclone::Cloner::operator()(), and translate::Translator::visit_function_dec_body().
|
inlineinherited |
Return result type.
References ast::FunctionDec::result_.
|
protectedinherited |
Instructions.
Referenced by ast::FunctionDec::body_get(), ast::FunctionDec::body_set(), and ast::FunctionDec::~FunctionDec().
|
protectedinherited |
Formal arguments.
Referenced by ast::FunctionDec::formals_get(), and ast::FunctionDec::~FunctionDec().
|
protectedinherited |
Scanner position information.
Referenced by ast::Ast::location_get(), ast::Ast::location_set(), ast::DecsList::push_back(), and ast::DecsList::push_front().
|
protectedinherited |
Name of the defined entity.
Referenced by ast::Dec::name_get(), and ast::Dec::name_set().
|
protectedinherited |
Result type.
Referenced by ast::FunctionDec::result_get(), and ast::FunctionDec::~FunctionDec().