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, Ptr< RecDecl > next) | |
| Tok::Tag | tag () const |
| bool | is_external () const |
| extern without a body is a forward declaration whose implementation lives in a native translation unit. | |
| auto | doms () const |
| const Dom * | dom (size_t i) const |
| size_t | num_doms () const |
| const Expr * | codom () const |
| void | bind_decl (Scopes &) const override |
| void | bind_body (Scopes &) const override |
| void | emit_decl (Emitter &) const override |
| void | emit_body (Emitter &) 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::RecDecl | |
| RecDecl (Loc loc, Mods mods, Dbg dbg, Ptr< Expr > body, Ptr< RecDecl > next) | |
| Dbg | dbg () const override |
| The name this Decl introduces; anonymous if it has none. | |
| const Expr * | body () const |
| const RecDecl * | next () const |
| 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 |
Protected Member Functions | |
| void | stream_ (fe::Tab &, std::ostream &) const override |
| Streams this declaration alone - without the leading rec/and and without the trailing ;. | |
| 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) | |
Additional Inherited Members | |
| 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 1084 of file ast.h.
References mim::ast::RecDecl::body(), codom(), mim::ast::RecDecl::dbg(), mim::ast::Node::loc(), mim::ast::ValDecl::mods(), mim::ast::RecDecl::next(), mim::ast::RecDecl::RecDecl(), and tag().
The (AnnexInfo, sub) slot this decl registered itself under as an annex; {nullptr, 0} if it isn't one.
Reimplemented from mim::ast::Decl.
|
overridevirtual |
Reimplemented from mim::ast::RecDecl.
Definition at line 496 of file bind.cpp.
References mim::ast::RecDecl::body(), dom(), and doms().
|
overridevirtual |
Reimplemented from mim::ast::RecDecl.
Definition at line 466 of file bind.cpp.
References C_CN, C_DS, codom(), mim::ast::RecDecl::dbg(), dom(), doms(), mim::ast::ValDecl::is_anx(), ISA, mim::ast::Node::loc(), num_doms(), and tag().
|
inline |
Definition at line 1095 of file ast.h.
Referenced by bind_decl(), emit_decl(), LamDecl(), and stream_().
|
inline |
Definition at line 1093 of file ast.h.
References doms().
Referenced by bind_body(), bind_decl(), emit_body(), and emit_decl().
|
inline |
Definition at line 1092 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 618 of file emit.cpp.
References mim::ast::RecDecl::body(), mim::ast::RecDecl::dbg(), mim::ast::Decl::def_, dom(), doms(), mim::ast::RecDecl::emit(), mim::Hole, is_external(), mim::ast::Node::loc(), num_doms(), mim::Pi::set(), and mim::VarRewriter::VarRewriter().
|
overridevirtual |
Reimplemented from mim::ast::RecDecl.
Definition at line 589 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 |
extern without a body is a forward declaration whose implementation lives in a native translation unit.
Definition at line 1091 of file ast.h.
References mim::ast::ValDecl::is_extern().
Referenced by emit_body().
|
inline |
Definition at line 1094 of file ast.h.
References doms().
Referenced by bind_decl(), emit_body(), and emit_decl().
|
overrideprotectedvirtual |
Streams this declaration alone - without the leading rec/and and without the trailing ;.
Reimplemented from mim::ast::RecDecl.
Definition at line 281 of file stream.cpp.
References mim::ast::RecDecl::body(), codom(), mim::ast::RecDecl::dbg(), doms(), mim::ast::R< T >::R(), mim::ast::S::S(), and tag().
|
inline |
Definition at line 1089 of file ast.h.
Referenced by bind_decl(), LamDecl(), and stream_().