rec dbg = body; with an optional and RecDecl::next. More...
#include <mim/ast/ast.h>
Public Member Functions | |
| 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 |
| virtual void | bind_decl (Scopes &) const |
| virtual void | bind_body (Scopes &) const |
| void | emit (Emitter &) const override |
| virtual void | emit_decl (Emitter &) const |
| virtual void | emit_body (Emitter &) const |
| 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 | |
| virtual void | stream_ (fe::Tab &, std::ostream &) const |
| 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 |
rec dbg = body; with an optional and RecDecl::next.
|
inline |
Definition at line 1025 of file ast.h.
References body(), dbg(), mim::ast::Node::loc(), mim::ast::ValDecl::mods(), next(), and mim::ast::ValDecl::ValDecl().
Referenced by mim::ast::LamDecl::LamDecl(), and next().
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 |
Implements mim::ast::ValDecl.
|
virtual |
|
virtual |
Reimplemented in mim::ast::LamDecl.
Definition at line 449 of file bind.cpp.
References body(), dbg(), mim::ast::ValDecl::is_anx(), mim::ast::InfixExpr::isa_op(), and mim::ast::Node::loc().
|
inline |
Definition at line 1032 of file ast.h.
Referenced by mim::ast::LamDecl::bind_body(), bind_body(), bind_decl(), mim::ast::LamDecl::emit_body(), emit_body(), emit_decl(), mim::ast::LamDecl::LamDecl(), RecDecl(), mim::ast::LamDecl::stream_(), and stream_().
|
inlineoverridevirtual |
The name this Decl introduces; anonymous if it has none.
Reimplemented from mim::ast::Decl.
Definition at line 1031 of file ast.h.
Referenced by mim::ast::LamDecl::bind_decl(), bind_decl(), mim::ast::LamDecl::emit_body(), emit_body(), mim::ast::LamDecl::emit_decl(), emit_decl(), mim::ast::LamDecl::LamDecl(), RecDecl(), mim::ast::LamDecl::stream_(), and stream_().
|
overridevirtual |
Implements mim::ast::ValDecl.
Definition at line 553 of file emit.cpp.
Referenced by mim::ast::LamDecl::emit_body().
|
virtual |
Reimplemented in mim::ast::LamDecl.
Definition at line 566 of file emit.cpp.
References body(), dbg(), mim::ast::Decl::def_, and mim::ast::Node::loc().
|
virtual |
Reimplemented in mim::ast::LamDecl.
Definition at line 560 of file emit.cpp.
References body(), dbg(), mim::ast::Decl::def_, and mim::ast::Node::loc().
|
inline |
|
overridevirtual |
Implements mim::ast::Node.
Definition at line 262 of file stream.cpp.
References mim::ast::ValDecl::mods(), next(), and stream_().
|
protectedvirtual |
Streams this declaration alone - without the leading rec/and and without the trailing ;.
Reimplemented in mim::ast::LamDecl.
Definition at line 273 of file stream.cpp.
References body(), dbg(), and mim::ast::S::S().
Referenced by stream().