Thorin 1.9.0
The Higher ORder INtermediate representation
|
dbg::(ptrn_0, ..., ptrn_n-1)
or dbg::[ptrn_0, ..., ptrn_n-1]
More...
#include <thorin/ast/ast.h>
Public Member Functions | |
TuplePtrn (Loc loc, bool rebind, Dbg dbg, 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 |
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 thorin::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 thorin::ast::Decl | |
Ref | def () const |
Public Member Functions inherited from thorin::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 thorin::ast::Ptrn | |
static Ptr< Expr > | to_expr (AST &, Ptr< Ptrn > &&) |
static Ptr< Ptrn > | to_ptrn (Ptr< Expr > &&) |
Protected Member Functions inherited from thorin::ast::Decl | |
Decl (Loc loc) | |
Protected Member Functions inherited from thorin::ast::Node | |
Node (Loc loc) | |
virtual | ~Node () |
Protected Attributes inherited from thorin::ast::Decl | |
Ref | def_ = nullptr |
|
overridevirtual |
Implements thorin::ast::Ptrn.
Definition at line 99 of file bind.cpp.
References thorin::ast::Ptrn::bind(), thorin::ast::Ptrn::dbg(), ptrn(), ptrns(), and thorin::ast::Ptrn::rebind().
|
inline |
Definition at line 246 of file ast.h.
Referenced by delim_r(), is_brckt(), is_paren(), and stream().
|
inline |
Definition at line 247 of file ast.h.
References delim_l(), and thorin::ast::Tok::delim_l2r().
Referenced by stream().
Definition at line 77 of file emit.cpp.
References thorin::Def::as_mut(), thorin::ast::Ptrn::dbg(), thorin::ast::Ptrn::emit_type(), thorin::ast::Ptrn::emit_value(), thorin::Sigma::immutabilize(), thorin::ast::Node::loc(), num_ptrns(), ptrn(), thorin::Def::set(), thorin::Sigma::set(), thorin::Dbg::sym(), and thorin::Def::var().
Referenced by emit_type().
Definition at line 100 of file emit.cpp.
References thorin::ast::Ptrn::dbg(), thorin::ast::Node::loc(), and num_ptrns().
Reimplemented from thorin::ast::Ptrn.
Definition at line 60 of file emit.cpp.
References thorin::ast::Decl::def(), thorin::ast::Ptrn::emit_value(), num_ptrns(), thorin::Def::proj(), and ptrn().
|
inline |
Definition at line 249 of file ast.h.
References delim_l().
Referenced by thorin::ast::Ptrn::to_expr().
|
inline |
|
inline |
Definition at line 253 of file ast.h.
References ptrns().
Referenced by emit_body(), emit_decl(), and emit_value_().
|
inline |
Definition at line 252 of file ast.h.
Referenced by bind(), emit_body(), and emit_value_().
|
inline |
Definition at line 251 of file ast.h.
Referenced by bind(), num_ptrns(), and stream().
|
overridevirtual |
Implements thorin::ast::Node.
Definition at line 64 of file stream.cpp.
References thorin::ast::Ptrn::dbg(), delim_l(), delim_r(), thorin::print(), and ptrns().