MimIR 0.1
MimIR is my Intermediate Representation
|
dbg::(ptrn_0, ..., ptrn_n-1)
or dbg::[ptrn_0, ..., ptrn_n-1]
More...
#include <mim/ast/ast.h>
Public Member Functions | |
TuplePtrn (Loc loc, Tok::Tag delim_l, Ptrs< Ptrn > &&ptrns, bool rebind, Dbg dbg) | |
Tok::Tag | delim_l () const |
Tok::Tag | delim_r () const |
bool | is_paren () const |
bool | is_brckt () const |
const auto & | ptrns () const |
const Ptrn * | ptrn (size_t i) const |
size_t | num_ptrns () const |
void | bind (Scopes &, bool quiet=false) const override |
Ref | emit_type (Emitter &) const override |
Ref | emit_decl (Emitter &, Ref type) const |
Ref | emit_body (Emitter &, Ref decl) const |
std::ostream & | stream (Tab &, std::ostream &) const override |
Public Member Functions inherited from mim::ast::Ptrn | |
Ptrn (Loc loc, bool rebind, Dbg dbg) | |
bool | rebind () const |
Dbg | dbg () const |
Ref | emit_value (Emitter &, Ref) const |
Public Member Functions inherited from mim::ast::Decl | |
Ref | def () const |
Public Member Functions inherited from mim::ast::Node | |
Loc | loc () const |
void | dump () const |
Private Member Functions | |
void | emit_value_ (Emitter &, Ref) const override |
Additional Inherited Members | |
Static Public Member Functions inherited from mim::ast::Ptrn | |
static Ptr< Expr > | to_expr (AST &, Ptr< Ptrn > &&) |
static Ptr< Ptrn > | to_ptrn (Ptr< Expr > &&) |
Protected Member Functions inherited from mim::ast::Decl | |
Decl (Loc loc) | |
Protected Member Functions inherited from mim::ast::Node | |
Node (Loc loc) | |
virtual | ~Node () |
Protected Attributes inherited from mim::ast::Decl | |
Ref | def_ = nullptr |
|
overridevirtual |
Implements mim::ast::Ptrn.
Definition at line 101 of file bind.cpp.
References mim::ast::Ptrn::bind(), mim::ast::Ptrn::dbg(), ptrn(), ptrns(), and mim::ast::Ptrn::rebind().
|
inline |
Definition at line 256 of file ast.h.
Referenced by delim_r(), is_brckt(), is_paren(), and stream().
|
inline |
Definition at line 257 of file ast.h.
References delim_l(), and mim::ast::Tok::delim_l2r().
Referenced by stream().
Definition at line 79 of file emit.cpp.
References mim::Def::as_mut(), mim::ast::Ptrn::dbg(), emit_type(), mim::ast::Ptrn::emit_value(), mim::Sigma::immutabilize(), mim::ast::Node::loc(), num_ptrns(), ptrn(), mim::Def::set(), mim::Sigma::set(), mim::Dbg::sym(), and mim::Def::var().
Referenced by emit_type().
Definition at line 102 of file emit.cpp.
References mim::ast::Ptrn::dbg(), mim::ast::Node::loc(), and num_ptrns().
Implements mim::ast::Ptrn.
Definition at line 77 of file emit.cpp.
References emit_body().
Referenced by emit_body().
Reimplemented from mim::ast::Ptrn.
Definition at line 60 of file emit.cpp.
References mim::ast::Decl::def(), mim::ast::Ptrn::emit_value(), num_ptrns(), mim::Def::proj(), and ptrn().
|
inline |
Definition at line 259 of file ast.h.
References delim_l().
Referenced by mim::ast::Ptrn::to_expr().
|
inline |
|
inline |
Definition at line 263 of file ast.h.
References ptrns().
Referenced by emit_body(), emit_decl(), and emit_value_().
|
inline |
Definition at line 262 of file ast.h.
Referenced by bind(), emit_body(), and emit_value_().
|
inline |
Definition at line 261 of file ast.h.
Referenced by bind(), num_ptrns(), and stream().
|
overridevirtual |
Implements mim::ast::Node.
Definition at line 66 of file stream.cpp.
References mim::ast::Ptrn::dbg(), delim_l(), delim_r(), mim::print(), and ptrns().