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

mod dbg { decls }; also the base of the anonymous File. More...

#include <mim/ast/ast.h>

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

Public Member Functions

 ModDecl (Loc loc, Vis vis, Dbg dbg, Scope &members, fe::View< Ptr< ValDecl > > decls)
Dbg dbg () const override
 The name this Decl introduces; anonymous if it has none.
auto decls () const
const Scopescope () const override
 Non-nullptr if this Decl is a module whose members a Path may walk into.
void bind (Scopes &) const override
void emit (Emitter &) 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 Modsmods () const
Public Member Functions inherited from mim::ast::Decl
const Defdef () const
virtual std::pair< AnnexInfo *, sub_tannex_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

Protected Member Functions

Scopemembers () const
void bind_decls (Scopes &) const
void emit_decls (Emitter &) const
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 Defdef_ = nullptr

Detailed Description

mod dbg { decls }; also the base of the anonymous File.

Definition at line 1170 of file ast.h.

Constructor & Destructor Documentation

◆ ModDecl()

mim::ast::ModDecl::ModDecl ( Loc loc,
Vis vis,
Dbg dbg,
Scope & members,
fe::View< Ptr< ValDecl > > decls )
inline

Member Function Documentation

◆ bind()

void mim::ast::ModDecl::bind ( Scopes & s) const
overridevirtual

Implements mim::ast::ValDecl.

Definition at line 509 of file bind.cpp.

References bind_decls(), dbg(), and members().

◆ bind_decls()

void mim::ast::ModDecl::bind_decls ( Scopes & s) const
protected

Definition at line 504 of file bind.cpp.

References decls().

Referenced by mim::ast::File::bind(), and bind().

◆ dbg()

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

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

Reimplemented from mim::ast::Decl.

Definition at line 1179 of file ast.h.

Referenced by bind(), ModDecl(), and stream().

◆ decls()

auto mim::ast::ModDecl::decls ( ) const
inline

◆ emit()

void mim::ast::ModDecl::emit ( Emitter & e) const
overridevirtual

Implements mim::ast::ValDecl.

Definition at line 544 of file emit.cpp.

References emit_decls().

◆ emit_decls()

void mim::ast::ModDecl::emit_decls ( Emitter & e) const
protected

Definition at line 539 of file emit.cpp.

References decls().

Referenced by mim::ast::File::emit(), and emit().

◆ members()

Scope & mim::ast::ModDecl::members ( ) const
inlineprotected

Definition at line 1188 of file ast.h.

Referenced by mim::ast::File::bind(), bind(), mim::ast::File::File(), and ModDecl().

◆ scope()

const Scope * mim::ast::ModDecl::scope ( ) const
inlineoverridevirtual

Non-nullptr if this Decl is a module whose members a Path may walk into.

Reimplemented from mim::ast::Decl.

Definition at line 1182 of file ast.h.

◆ stream()

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

Implements mim::ast::Node.

Definition at line 240 of file stream.cpp.

References dbg(), decls(), mim::ast::ValDecl::mods(), and mim::ast::stream_decls().


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