tag dbg dom_0 ... dom_n-1: codom = body; with LamDecl::tag lam/con/fun or anonymous λ/cn/fn. More...
#include <mim/ast/ast.h>
Classes | |
| class | Dom |
| One dom of a LamDecl: ptrn@(filter) with an optional : ret type. More... | |
Public Types | |
| using | VLA_Types = std::tuple<Ptr<Dom>> |
Public Member Functions | |
| LamDecl (Loc loc, Mods mods, Tok::Tag tag, Dbg dbg, Ptr< Expr > codom, Ptr< Expr > body, const NomDecl *nom_sugar) | |
| Tok::Tag | tag () const |
| auto | doms () const |
| const Dom * | dom (size_t i) const |
| size_t | num_doms () const |
| const Expr * | codom () const |
| const NomDecl * | nom_sugar () const |
| The nom of lam I dom+ = nom I = e; I if nom I dom+ = e desugared to this; within e, I is this LamDecl. | |
| void | bind_decl (Scopes &) const override |
| void | bind_body (Scopes &) const override |
| void | emit_decl (Emitter &) const override |
| void | emit_body (Emitter &) const override |
| void | stream_ (fe::Tab &, std::ostream &) const override |
| Streams this declaration without modifiers and without the trailing ;. | |
| Public Member Functions inherited from mim::ast::RecDecl | |
| RecDecl (Loc loc, Mods mods, Dbg dbg, Ptr< Expr > body) | |
| Dbg | dbg () const override |
| The name this Decl introduces; anonymous if it has none. | |
| const Expr * | body () const |
| bool | has_mut_body () const |
| Only such a body is emitted as a mutable, so only it may refer to the declaration itself. | |
| void | bind (Scopes &) const override |
| void | emit (Emitter &) const override |
| void | stream (fe::Tab &, std::ostream &) const override |
| std::pair< AnnexInfo *, sub_t > | annex_sub () const override |
| The (AnnexInfo, sub) slot this decl registered itself under as an annex; {nullptr, 0} if it isn't one. | |
| Public Member Functions inherited from mim::ast::ValDecl | |
| Vis | vis () const override |
| A ValDecl's own Vis; Pub for anything else (Ptrn, Import, ...), which the priv/pub system ignores. | |
| bool | is_extern () const override |
| Whether this decl crosses the Mim/native boundary (extern); body presence picks which side supplies it. | |
| bool | is_anx () const override |
| Whether this decl is registered as a compiler-exposed annex (anx). | |
| const Mods & | mods () const |
| Public Member Functions inherited from mim::ast::Decl | |
| const Def * | def () const |
| virtual const Scope * | scope () const |
| Non-nullptr if this Decl is a module whose members a Path may walk into. | |
| Public Member Functions inherited from mim::ast::Node | |
| Loc | loc () const |
| void | dump () const |
Additional Inherited Members | |
| Protected Member Functions inherited from mim::ast::ValDecl | |
| ValDecl (Loc loc, Mods mods={}) | |
| Protected Member Functions inherited from mim::ast::Decl | |
| Decl (Loc loc) | |
| Protected Member Functions inherited from mim::ast::Node | |
| Node (Loc loc) | |
| Protected Attributes inherited from mim::ast::RecDecl | |
| AnnexInfo * | annex_ = nullptr |
| sub_t | sub_ = 0 |
| Protected Attributes inherited from mim::ast::Decl | |
| const Def * | def_ = nullptr |
tag dbg dom_0 ... dom_n-1: codom = body; with LamDecl::tag lam/con/fun or anonymous λ/cn/fn.
| using mim::ast::LamDecl::VLA_Types = std::tuple<Ptr<Dom>> |
|
inline |
Definition at line 1222 of file ast.h.
References mim::ast::RecDecl::body(), codom(), mim::ast::RecDecl::dbg(), mim::ast::Node::loc(), mim::ast::ValDecl::mods(), nom_sugar(), mim::ast::RecDecl::RecDecl(), and tag().
|
overridevirtual |
Reimplemented from mim::ast::RecDecl.
Definition at line 583 of file bind.cpp.
References mim::ast::RecDecl::body(), dom(), doms(), and nom_sugar().
|
overridevirtual |
Reimplemented from mim::ast::RecDecl.
Definition at line 553 of file bind.cpp.
References mim::ast::RecDecl::annex_, mim::ast::RecDecl::body(), C_CN, C_DS, codom(), mim::ast::RecDecl::dbg(), dom(), doms(), mim::ast::ValDecl::is_anx(), ISA, mim::ast::Node::loc(), nom_sugar(), mim::ast::RecDecl::sub_, and tag().
|
inline |
Definition at line 1232 of file ast.h.
Referenced by bind_decl(), emit_decl(), LamDecl(), and stream_().
|
inline |
Definition at line 1230 of file ast.h.
References doms().
Referenced by bind_body(), bind_decl(), emit_body(), emit_decl(), and stream_().
|
inline |
Definition at line 1229 of file ast.h.
Referenced by bind_body(), bind_decl(), dom(), emit_body(), emit_decl(), num_doms(), and stream_().
|
overridevirtual |
Reimplemented from mim::ast::RecDecl.
Definition at line 1058 of file emit.cpp.
References mim::ast::RecDecl::annex_, mim::ast::RecDecl::body(), mim::ast::RecDecl::dbg(), mim::ast::Decl::def_, dom(), doms(), mim::ast::RecDecl::emit(), mim::ast::ValDecl::is_extern(), mim::ast::Node::loc(), nom_sugar(), num_doms(), mim::Pi::set(), mim::ast::RecDecl::sub_, and mim::VarRewriter::VarRewriter().
|
overridevirtual |
Reimplemented from mim::ast::RecDecl.
Definition at line 1029 of file emit.cpp.
References C_DS, codom(), mim::ast::RecDecl::dbg(), mim::ast::Decl::def_, dom(), doms(), ISA, mim::ast::Node::loc(), and num_doms().
|
inline |
The nom of lam I dom+ = nom I = e; I if nom I dom+ = e desugared to this; within e, I is this LamDecl.
Definition at line 1234 of file ast.h.
Referenced by bind_body(), bind_decl(), emit_body(), LamDecl(), and stream_().
|
inline |
Definition at line 1231 of file ast.h.
References doms().
Referenced by emit_body(), and emit_decl().
|
overridevirtual |
Streams this declaration without modifiers and without the trailing ;.
Reimplemented from mim::ast::RecDecl.
Definition at line 352 of file stream.cpp.
References mim::ast::RecDecl::body(), codom(), mim::ast::RecDecl::dbg(), dom(), doms(), mim::ast::is_block(), nom_sugar(), mim::ast::S::S(), and tag().
|
inline |
Definition at line 1228 of file ast.h.
Referenced by bind_decl(), LamDecl(), and stream_().