Base class of all expressions. More...
#include <mim/ast/ast.h>
Public Member Functions | |
| virtual void | bind (Scopes &) const =0 |
emit | |
Each installs this Expr's Loc as World::get_loc, so every Def emitted underneath is blamed on it. | |
| const Def * | emit (Emitter &) const |
| const Def * | emit_decl (Emitter &, const Def *type) const |
| void | emit_body (Emitter &, const Def *decl) const |
| Public Member Functions inherited from mim::ast::Node | |
| Loc | loc () const |
| virtual void | stream (fe::Tab &, std::ostream &) const =0 |
| void | dump () const |
Protected Member Functions | |
| Expr (Loc loc) | |
| Protected Member Functions inherited from mim::ast::Node | |
| Node (Loc loc) | |
Private Member Functions | |
| virtual const Def * | emit_ (Emitter &) const =0 |
| virtual const Def * | emit_decl_ (Emitter &, const Def *) const |
| virtual void | emit_body_ (Emitter &, const Def *) const |
|
inlineprotected |
Definition at line 209 of file ast.h.
References mim::ast::Node::loc(), and mim::ast::Node::Node().
Referenced by mim::ast::AppExpr::AppExpr(), mim::ast::AppExpr::arg(), mim::ast::RetExpr::arg(), mim::ast::MatchExpr::Arm::body(), mim::ast::RetExpr::body(), mim::ast::SeqExpr::body(), mim::ast::AppExpr::callee(), mim::ast::InfixExpr::callee(), mim::ast::RetExpr::callee(), mim::ast::DeclExpr::DeclExpr(), mim::ast::RuleExpr::dom(), mim::ast::TupleExpr::elem(), mim::ast::ErrorExpr::ErrorExpr(), mim::ast::DeclExpr::expr(), mim::ast::HoleExpr::HoleExpr(), mim::ast::InfixExpr::InfixExpr(), mim::ast::UniqExpr::inhabitant(), mim::ast::InfixExpr::isa_op(), mim::ast::LamExpr::LamExpr(), mim::ast::TypeExpr::level(), mim::ast::InfixExpr::lhs(), mim::ast::LitExpr::LitExpr(), mim::ast::MatchExpr::MatchExpr(), mim::ast::PathExpr::PathExpr(), mim::ast::PiExpr::PiExpr(), mim::ast::PrimaryExpr::PrimaryExpr(), mim::ast::RetExpr::RetExpr(), mim::ast::InfixExpr::rhs(), mim::ast::RuleExpr::RuleExpr(), mim::ast::MatchExpr::scrutinee(), mim::ast::SeqExpr::SeqExpr(), mim::ast::SigmaExpr::SigmaExpr(), mim::ast::TupleExpr::TupleExpr(), mim::ast::LitExpr::type(), mim::ast::TypeExpr::TypeExpr(), and mim::ast::UniqExpr::UniqExpr().
|
pure virtual |
Implemented in mim::ast::AppExpr, mim::ast::DeclExpr, mim::ast::ErrorExpr, mim::ast::HoleExpr, mim::ast::InfixExpr, mim::ast::LamExpr, mim::ast::LitExpr, mim::ast::MatchExpr, mim::ast::PathExpr, mim::ast::PiExpr, mim::ast::PrimaryExpr, mim::ast::RetExpr, mim::ast::RuleExpr, mim::ast::SeqExpr, mim::ast::SigmaExpr, mim::ast::TupleExpr, mim::ast::TypeExpr, and mim::ast::UniqExpr.
Referenced by mim::ast::DeclExpr::bind(), mim::ast::IdPtrn::bind(), mim::ast::InfixExpr::bind(), mim::ast::LitExpr::bind(), mim::ast::MatchExpr::Arm::bind(), and mim::ast::MatchExpr::bind().
Definition at line 142 of file emit.cpp.
References emit_(), and mim::ast::Node::loc().
Referenced by mim::ast::DeclExpr::emit_(), mim::ast::InfixExpr::emit_(), mim::ast::LitExpr::emit_(), mim::ast::MatchExpr::emit_(), mim::ast::RetExpr::emit_(), mim::ast::RuleExpr::emit_(), mim::ast::SeqExpr::emit_(), mim::ast::TypeExpr::emit_(), mim::ast::UniqExpr::emit_(), mim::ast::InfixExpr::emit_body_(), mim::ast::PiExpr::emit_body_(), mim::ast::IdPtrn::emit_type(), and mim::ast::emit_union().
Implemented in mim::ast::AppExpr, mim::ast::DeclExpr, mim::ast::ErrorExpr, mim::ast::HoleExpr, mim::ast::InfixExpr, mim::ast::LamExpr, mim::ast::LitExpr, mim::ast::MatchExpr, mim::ast::PathExpr, mim::ast::PiExpr, mim::ast::PrimaryExpr, mim::ast::RetExpr, mim::ast::RuleExpr, mim::ast::SeqExpr, mim::ast::SigmaExpr, mim::ast::TupleExpr, mim::ast::TypeExpr, and mim::ast::UniqExpr.
Referenced by emit().
Definition at line 152 of file emit.cpp.
References emit_body_(), and mim::ast::Node::loc().
Referenced by mim::ast::LamExpr::emit_().
Reimplemented in mim::ast::InfixExpr, mim::ast::LamExpr, mim::ast::PiExpr, and mim::ast::SigmaExpr.
Definition at line 226 of file ast.h.
Referenced by emit_body().
Definition at line 147 of file emit.cpp.
References emit_decl_(), and mim::ast::Node::loc().
Referenced by mim::ast::LamExpr::emit_().
|
inlineprivatevirtual |
Reimplemented in mim::ast::InfixExpr, mim::ast::LamExpr, mim::ast::PiExpr, and mim::ast::SigmaExpr.
Definition at line 225 of file ast.h.
Referenced by emit_decl().