MimIR 0.1
MimIR is my Intermediate Representation
|
#include <mim/ast/ast.h>
Public Member Functions | |
const Def * | emit (Emitter &) const |
virtual void | bind (Scopes &) const =0 |
virtual const Def * | emit_decl (Emitter &, const Def *) const |
virtual void | emit_body (Emitter &, const Def *) const |
![]() | |
Loc | loc () const |
virtual std::ostream & | stream (Tab &, std::ostream &) const =0 |
void | dump () const |
Protected Member Functions | |
Expr (Loc loc) | |
![]() | |
Node (Loc loc) | |
virtual | ~Node () |
Private Member Functions | |
virtual const Def * | emit_ (Emitter &) const =0 |
Precedence | |
enum class | Prec { Err , Bot , Where , Arrow , Pi , App , Extract , Lit } |
static constexpr bool | is_rassoc (Prec p) |
|
strong |
|
inlineprotected |
Definition at line 132 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::ArrOrPackExpr< true >::ArrOrPackExpr(), mim::ast::ArrowExpr::ArrowExpr(), mim::ast::ArrOrPackExpr< true >::body(), mim::ast::RetExpr::body(), mim::ast::AppExpr::callee(), mim::ast::RetExpr::callee(), mim::ast::DeclExpr::DeclExpr(), mim::ast::TupleExpr::elem(), mim::ast::ErrorExpr::ErrorExpr(), mim::ast::DeclExpr::expr(), mim::ast::ExtractExpr::ExtractExpr(), mim::ast::ExtractExpr::ExtractExpr(), mim::ast::HoleExpr::HoleExpr(), mim::ast::IdExpr::IdExpr(), mim::ast::InsertExpr::index(), mim::ast::UniqExpr::inhabitant(), mim::ast::InsertExpr::InsertExpr(), mim::ast::LamExpr::LamExpr(), mim::ast::TypeExpr::level(), mim::ast::LitExpr::LitExpr(), mim::ast::PiExpr::PiExpr(), mim::ast::PrimaryExpr::PrimaryExpr(), mim::ast::RetExpr::RetExpr(), mim::ast::SigmaExpr::SigmaExpr(), mim::ast::ExtractExpr::tuple(), mim::ast::InsertExpr::tuple(), mim::ast::TupleExpr::TupleExpr(), mim::ast::LitExpr::type(), mim::ast::TypeExpr::TypeExpr(), mim::ast::UniqExpr::UniqExpr(), and mim::ast::InsertExpr::value().
|
pure virtual |
Implemented in mim::ast::AppExpr, mim::ast::ArrOrPackExpr< arr >, mim::ast::ArrOrPackExpr< false >, mim::ast::ArrOrPackExpr< false >, mim::ast::ArrOrPackExpr< true >, mim::ast::ArrOrPackExpr< true >, mim::ast::ArrowExpr, mim::ast::DeclExpr, mim::ast::ErrorExpr, mim::ast::ExtractExpr, mim::ast::HoleExpr, mim::ast::IdExpr, mim::ast::InsertExpr, mim::ast::LamExpr, mim::ast::LitExpr, mim::ast::PiExpr, mim::ast::PrimaryExpr, mim::ast::RetExpr, mim::ast::SigmaExpr, mim::ast::TupleExpr, mim::ast::TypeExpr, and mim::ast::UniqExpr.
Referenced by mim::ast::DeclExpr::bind(), mim::ast::IdPtrn::bind(), and mim::ast::LitExpr::bind().
Definition at line 123 of file emit.cpp.
References emit_(), and mim::ast::Node::loc().
Referenced by mim::ast::ArrOrPackExpr< arr >::emit_(), mim::ast::DeclExpr::emit_(), mim::ast::LitExpr::emit_(), mim::ast::RetExpr::emit_(), mim::ast::TypeExpr::emit_(), mim::ast::UniqExpr::emit_(), mim::ast::ArrowExpr::emit_body(), mim::ast::LamDecl::emit_body(), mim::ast::PiExpr::emit_body(), and mim::ast::IdPtrn::emit_type().
Implemented in mim::ast::AppExpr, mim::ast::ArrOrPackExpr< arr >, mim::ast::ArrOrPackExpr< false >, mim::ast::ArrOrPackExpr< false >, mim::ast::ArrOrPackExpr< true >, mim::ast::ArrOrPackExpr< true >, mim::ast::ArrowExpr, mim::ast::DeclExpr, mim::ast::ErrorExpr, mim::ast::ExtractExpr, mim::ast::HoleExpr, mim::ast::IdExpr, mim::ast::InsertExpr, mim::ast::LamExpr, mim::ast::LitExpr, mim::ast::PiExpr, mim::ast::PrimaryExpr, mim::ast::RetExpr, mim::ast::SigmaExpr, mim::ast::TupleExpr, mim::ast::TypeExpr, and mim::ast::UniqExpr.
Referenced by emit().
Reimplemented in mim::ast::ArrowExpr, mim::ast::LamExpr, mim::ast::PiExpr, and mim::ast::SigmaExpr.
Reimplemented in mim::ast::ArrowExpr, mim::ast::LamExpr, mim::ast::PiExpr, and mim::ast::SigmaExpr.