rule dbg var: lhs when guard => rhs; or norm instead of rule if RuleDecl::is_normalizer. More...
#include <mim/ast/ast.h>
Public Member Functions | |
| RuleDecl (Loc loc, Dbg dbg, Ptr< Ptrn > var, Ptr< Expr > lhs, Ptr< Expr > rhs, Ptr< Expr > guard, bool is_normalizer) | |
| Dbg | dbg () const override |
| The name this Decl introduces; anonymous if it has none. | |
| const Ptrn * | var () const |
| const Expr * | lhs () const |
| const Expr * | rhs () const |
| const Expr * | guard () const |
| bool | is_normalizer () const |
| void | bind (Scopes &) const override |
| void | stream (fe::Tab &, std::ostream &) const override |
| 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. | |
| 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 |
| void | dump () const |
Private Member Functions | |
| void | emit (Emitter &) const override |
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::Decl | |
| const Def * | def_ = nullptr |
|
inline |
Definition at line 1139 of file ast.h.
References dbg(), guard(), is_normalizer(), lhs(), mim::ast::Node::loc(), rhs(), mim::ast::ValDecl::ValDecl(), and var().
|
overridevirtual |
|
inlineoverridevirtual |
The name this Decl introduces; anonymous if it has none.
Reimplemented from mim::ast::Decl.
Definition at line 1148 of file ast.h.
Referenced by bind(), emit(), and RuleDecl().
|
overrideprivatevirtual |
Implements mim::ast::ValDecl.
Definition at line 665 of file emit.cpp.
References dbg(), mim::ast::Decl::def_, guard(), lhs(), mim::ast::Node::loc(), rhs(), and var().
|
inline |
|
inline |
Definition at line 1153 of file ast.h.
Referenced by RuleDecl().
|
inline |
|
inline |
|
overridevirtual |
Implements mim::ast::Node.
Definition at line 298 of file stream.cpp.
References guard(), lhs(), rhs(), mim::ast::S::S(), and var().
|
inline |