MimIR
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
mim::ast::ValDecl Class Referenceabstract

Base class of all declarations that bind values. More...

#include <mim/ast/ast.h>

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

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 Modsmods () const
virtual void bind (Scopes &) const =0
virtual void emit (Emitter &) const =0
Public Member Functions inherited from mim::ast::Decl
const Defdef () const
virtual Dbg dbg () const
 The name this Decl introduces; anonymous if it has none.
virtual const Scopescope () const
 Non-nullptr if this Decl is a module whose members a Path may walk into.
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
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 Defdef_ = nullptr

Detailed Description

Base class of all declarations that bind values.

Definition at line 256 of file ast.h.

Constructor & Destructor Documentation

◆ ValDecl()

Member Function Documentation

◆ bind()

◆ emit()

◆ is_anx()

bool mim::ast::ValDecl::is_anx ( ) const
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().

◆ is_extern()

bool mim::ast::ValDecl::is_extern ( ) const
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().

◆ mods()

◆ vis()

Vis mim::ast::ValDecl::vis ( ) const
inlineoverridevirtual

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