Base class of all declarations that bind values. More...
#include <mim/ast/ast.h>
Public Member Functions | |
| 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 |
| virtual void | bind (Scopes &) const =0 |
| virtual void | emit (Emitter &) const =0 |
| Public Member Functions inherited from mim::ast::Decl | |
| const Def * | def () const |
| virtual Dbg | dbg () const |
| The name this Decl introduces; anonymous if it has none. | |
| virtual const Scope * | scope () const |
| Non-nullptr if this Decl is a module whose members a Path may walk into. | |
| virtual std::pair< AnnexInfo *, sub_t > | annex_sub () const |
| 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::Node | |
| Loc | loc () const |
| virtual void | stream (fe::Tab &, std::ostream &) const =0 |
| void | dump () const |
Protected Member Functions | |
| 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 |
|
inlineprotected |
Definition at line 258 of file ast.h.
References mim::ast::Node::loc(), and mods().
Referenced by mim::ast::AliasDecl::AliasDecl(), mim::ast::AxmDecl::AxmDecl(), mim::ast::LetDecl::LetDecl(), mim::ast::ModDecl::ModDecl(), mim::ast::RecDecl::RecDecl(), mim::ast::RuleDecl::RuleDecl(), mim::ast::AxmDecl::Sibling::Sibling(), mim::ast::UseDecl::UseDecl(), and mim::ast::UseDecl::UseDecl().
|
pure virtual |
|
pure virtual |
|
inlineoverridevirtual |
Whether this decl is registered as a compiler-exposed annex (anx).
Reimplemented from mim::ast::Decl.
Definition at line 265 of file ast.h.
Referenced by mim::ast::LetDecl::bind(), mim::ast::LamDecl::bind_decl(), and mim::ast::RecDecl::bind_decl().
|
inlineoverridevirtual |
Whether this decl crosses the Mim/native boundary (extern); body presence picks which side supplies it.
Reimplemented from mim::ast::Decl.
Definition at line 264 of file ast.h.
Referenced by mim::ast::LamDecl::is_external().
|
inline |
Definition at line 266 of file ast.h.
Referenced by mim::ast::LamDecl::LamDecl(), mim::ast::LetDecl::LetDecl(), mim::ast::RecDecl::RecDecl(), mim::ast::LetDecl::stream(), mim::ast::ModDecl::stream(), mim::ast::RecDecl::stream(), mim::ast::UseDecl::stream(), mim::ast::UseDecl::UseDecl(), mim::ast::UseDecl::UseDecl(), and ValDecl().
|
inlineoverridevirtual |
A ValDecl's own Vis; Pub for anything else (Ptrn, Import, ...), which the priv/pub system ignores.
Reimplemented from mim::ast::Decl.
Definition at line 263 of file ast.h.
Referenced by mim::ast::AliasDecl::AliasDecl(), mim::ast::AxmDecl::AxmDecl(), mim::ast::LetDecl::bind(), mim::ast::UseDecl::bind(), mim::ast::ModDecl::ModDecl(), mim::ast::AxmDecl::Sibling::Sibling(), mim::ast::AliasDecl::stream(), mim::ast::AxmDecl::Sibling::stream(), and mim::ast::AxmDecl::stream().