MimIR 0.1
MimIR is my Intermediate Representation
|
(ptrn_0, ..., ptrn_n-1)
, [ptrn_0, ..., ptrn_n-1]
, or {ptrn_0, ..., ptrn_n-1}
More...
#include <mim/ast/ast.h>
Public Member Functions | |
TuplePtrn (Loc loc, Tok::Tag delim_l, Ptrs< Ptrn > &&ptrns) | |
Tok::Tag | delim_l () const |
Tok::Tag | delim_r () const |
bool | is_paren () const |
bool | is_brckt () const |
bool | implicit () const override |
const auto & | ptrns () const |
const Ptrn * | ptrn (size_t i) const |
size_t | num_ptrns () const |
void | bind (Scopes &, bool rebind, bool quiet) const override |
Ref | emit_value (Emitter &, Ref) 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) | |
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 |
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 |
(ptrn_0, ..., ptrn_n-1)
, [ptrn_0, ..., ptrn_n-1]
, or {ptrn_0, ..., ptrn_n-1}
|
overridevirtual |
Implements mim::ast::Ptrn.
Definition at line 107 of file bind.cpp.
References mim::ast::Ptrn::bind(), ptrn(), and ptrns().
|
inline |
Definition at line 294 of file ast.h.
Referenced by delim_r(), is_brckt(), is_paren(), and stream().
|
inline |
Definition at line 295 of file ast.h.
References delim_l(), and mim::ast::Tok::delim_l2r().
Referenced by stream().
Definition at line 88 of file emit.cpp.
References mim::Def::as_mut(), emit_type(), mim::ast::Ptrn::emit_value(), mim::Sigma::immutabilize(), mim::ast::Node::loc(), num_ptrns(), ptrn(), mim::Sigma::set(), and mim::Def::var().
Referenced by emit_type().
Definition at line 111 of file emit.cpp.
References mim::ast::Node::loc(), and num_ptrns().
Implements mim::ast::Ptrn.
Definition at line 86 of file emit.cpp.
References emit_body().
Referenced by emit_body(), and emit_value().
Implements mim::ast::Ptrn.
Definition at line 64 of file emit.cpp.
References mim::ast::Decl::def(), mim::ast::Decl::def_, emit_type(), mim::ast::Ptrn::emit_value(), mim::ast::Node::loc(), num_ptrns(), mim::Def::proj(), and ptrn().
|
inlineoverridevirtual |
Reimplemented from mim::ast::Ptrn.
|
inline |
Definition at line 297 of file ast.h.
References delim_l().
Referenced by mim::ast::Ptrn::to_expr().
|
inline |
|
inline |
Definition at line 302 of file ast.h.
References ptrns().
Referenced by emit_body(), emit_decl(), and emit_value().
|
inline |
Definition at line 301 of file ast.h.
Referenced by bind(), emit_body(), and emit_value().
|
inline |
Definition at line 300 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 delim_l(), delim_r(), mim::print(), and ptrns().