LRDE Tiger Compiler
1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
|
Type-checking an ast::Ast. More...
Namespaces | |
namespace | tasks |
Classes | |
class | Array |
Array types. More... | |
class | Attribute |
The base object for Class attributes. More... | |
class | Nil |
The builtin type of `nil' only (singleton class). More... | |
class | Class |
Class types. More... | |
class | Field |
The base type for Record fields. More... | |
class | Function |
Function types. More... | |
class | Method |
Method types. More... | |
class | Named |
Named types. More... | |
class | Record |
Record types. More... | |
class | TypeChecker |
class | Type |
Abstract a type. More... |
Functions | |
std::ostream & | operator<< (std::ostream &ostr, const Attribute &a) |
Overload redirection operator for Attribute. | |
std::ostream & | operator<< (std::ostream &ostr, const Field &obj) |
Overload redirection operator for Field. | |
misc::error | types_check (ast::Ast &tree) |
misc::error | types_check (::ast::Ast &tree) |
Check types in a (bound) AST. | |
template<> | |
void | TypeChecker::visit_dec_header< ast::FunctionDec > (ast::FunctionDec &e) |
Visit the lhs of an ast::FunctionDec. | |
template<> | |
void | TypeChecker::visit_dec_body< ast::FunctionDec > (ast::FunctionDec &e) |
Visit the rhs of an ast::FunctionDec. | |
template<> | |
void | TypeChecker::visit_dec_header< ast::TypeDec > (ast::TypeDec &e) |
Visit the lhs of an ast::TypeDec. | |
template<> | |
void | TypeChecker::visit_dec_body< ast::TypeDec > (ast::TypeDec &e) |
Visit the rhs of an ast::TypeDec. | |
std::ostream & | operator<< (std::ostream &ostr, const Type &t) |
Overload redirection operator for Type. | |
bool | operator== (const Type &lhs, const Type &rhs) |
Compare two Type s. | |
bool | operator!= (const Type &lhs, const Type &rhs) |
!(a == b). |
Variables | |
const misc::xalloc< bool > | hide_actual_types |
Hide actual types? (i.e., print only the surface type?) |
Type-checking an ast::Ast.
bool type::operator!= | ( | const Type & | lhs, |
const Type & | rhs | ||
) |
!(a == b).
|
inline |
Overload redirection operator for Attribute.
References type::Attribute::dump().
std::ostream& type::operator<< | ( | std::ostream & | ostr, |
const Type & | t | ||
) |
Overload redirection operator for Type.
|
inline |
Overload redirection operator for Field.
References type::Field::dump().
bool type::operator== | ( | const Type & | lhs, |
const Type & | rhs | ||
) |
Compare two Type s.
Return true iff a and b are equivalent Tiger Types. E.g., if a and b are different but point to the same type, then return true.
Referenced by misc::unique< T, C >::operator!=().
void type::TypeChecker::visit_dec_body< ast::FunctionDec > | ( | ast::FunctionDec & | e | ) |
Visit the rhs of an ast::FunctionDec.
void type::TypeChecker::visit_dec_body< ast::TypeDec > | ( | ast::TypeDec & | e | ) |
Visit the rhs of an ast::TypeDec.
void type::TypeChecker::visit_dec_header< ast::FunctionDec > | ( | ast::FunctionDec & | e | ) |
Visit the lhs of an ast::FunctionDec.
void type::TypeChecker::visit_dec_header< ast::TypeDec > | ( | ast::TypeDec & | e | ) |
Visit the lhs of an ast::TypeDec.
misc::error type::types_check | ( | ast::Ast & | tree | ) |
References type::TypeChecker::error_get().
misc::error type::types_check | ( | ::ast::Ast & | tree | ) |
Check types in a (bound) AST.
tree | abstract syntax tree's root. |
const misc::xalloc< bool > type::hide_actual_types |
Hide actual types? (i.e., print only the surface type?)
Referenced by type::Function::dump().