MimIR
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
mim::ast::IdDecl Class Reference

dbg bound to a Def whose type the binding construct dictates; hence, it carries no annotation. More...

#include <mim/ast/ast.h>

Inheritance diagram for mim::ast::IdDecl:
[legend]

Public Member Functions

 IdDecl (Dbg dbg)
Dbg dbg () const override
 The name this Decl introduces; anonymous if it has none.
void bind (Scopes &, bool quiet=false) const
const Def * emit (const Def *) const
void stream (fe::Tab &, std::ostream &) const override
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.
virtual Vis vis () const
 A ValDecl's own Vis; Pub for anything else (Ptrn, Import, ...), which the priv/pub system ignores.
virtual bool is_extern () const
 Whether this decl crosses the Mim/native boundary (extern); body presence picks which side supplies it.
virtual bool is_anx () const
 Whether this decl is registered as a compiler-exposed annex (anx).
Public Member Functions inherited from mim::ast::Node
Loc loc () const
void dump () const

Additional Inherited Members

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

Detailed Description

dbg bound to a Def whose type the binding construct dictates; hence, it carries no annotation.

Definition at line 276 of file ast.h.

Constructor & Destructor Documentation

◆ IdDecl()

mim::ast::IdDecl::IdDecl ( Dbg dbg)
inline

Definition at line 278 of file ast.h.

References dbg(), mim::ast::Decl::Decl(), and mim::ast::Node::loc().

Member Function Documentation

◆ bind()

void mim::ast::IdDecl::bind ( Scopes & s,
bool quiet = false ) const

Definition at line 179 of file bind.cpp.

References dbg().

◆ dbg()

Dbg mim::ast::IdDecl::dbg ( ) const
inlineoverridevirtual

The name this Decl introduces; anonymous if it has none.

Reimplemented from mim::ast::Decl.

Definition at line 282 of file ast.h.

Referenced by bind(), emit(), IdDecl(), and stream().

◆ emit()

const Def * mim::ast::IdDecl::emit ( const Def * def) const

Definition at line 238 of file emit.cpp.

References dbg(), mim::ast::Decl::def(), mim::ast::Decl::def_, and mim::Def::set().

◆ stream()

void mim::ast::IdDecl::stream ( fe::Tab & ,
std::ostream & os ) const
overridevirtual

Implements mim::ast::Node.

Definition at line 93 of file stream.cpp.

References dbg().


The documentation for this class was generated from the following files: