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

anx dbg = path; - a compiler-exposed alias sharing its target's annex slot. More...

#include <mim/ast/ast.h>

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

Public Member Functions

 AliasDecl (Loc loc, Vis vis, Dbg dbg, Ptr< Path > path)
Dbg dbg () const override
 The name this Decl introduces; anonymous if it has none.
const Pathpath () const
void bind (Scopes &) const override
void emit (Emitter &) const override
void stream (fe::Tab &, std::ostream &) const override
std::pair< AnnexInfo *, sub_tannex_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 Modsmods () const
Public Member Functions inherited from mim::ast::Decl
const Defdef () const
virtual const Scopescope () 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

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 Defdef_ = nullptr

Detailed Description

anx dbg = path; - a compiler-exposed alias sharing its target's annex slot.

Definition at line 1114 of file ast.h.

Constructor & Destructor Documentation

◆ AliasDecl()

mim::ast::AliasDecl::AliasDecl ( Loc loc,
Vis vis,
Dbg dbg,
Ptr< Path > path )
inline

Definition at line 1116 of file ast.h.

References dbg(), mim::ast::Node::loc(), path(), mim::ast::ValDecl::ValDecl(), and mim::ast::ValDecl::vis().

Referenced by bind().

Member Function Documentation

◆ annex_sub()

std::pair< AnnexInfo *, sub_t > mim::ast::AliasDecl::annex_sub ( ) const
inlineoverridevirtual

The (AnnexInfo, sub) slot this decl registered itself under as an annex; {nullptr, 0} if it isn't one.

Reimplemented from mim::ast::Decl.

Definition at line 1127 of file ast.h.

◆ bind()

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

Implements mim::ast::ValDecl.

Definition at line 399 of file bind.cpp.

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

◆ dbg()

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

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

Reimplemented from mim::ast::Decl.

Definition at line 1121 of file ast.h.

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

◆ emit()

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

Implements mim::ast::ValDecl.

Definition at line 531 of file emit.cpp.

References dbg(), mim::ast::Decl::def_, and path().

◆ path()

const Path * mim::ast::AliasDecl::path ( ) const
inline

Definition at line 1122 of file ast.h.

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

◆ stream()

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

Implements mim::ast::Node.

Definition at line 235 of file stream.cpp.

References dbg(), path(), mim::ast::Priv, mim::ast::S::S(), and mim::ast::ValDecl::vis().


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