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

One of: More...

#include <mim/ast/ast.h>

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

Classes

class  Dom
 

Public Member Functions

 LamDecl (Loc loc, Tok::Tag tag, bool is_external, Dbg dbg, Ptrs< Dom > &&doms, Ptr< Expr > &&codom, Ptr< Expr > &&body, Ptr< RecDecl > &&next)
 
Tok::Tag tag () const
 
bool is_external () const
 
const Ptrs< Dom > & doms () const
 
const Domdom (size_t i) const
 
size_t num_doms () const
 
const Exprcodom () const
 
void bind_decl (Scopes &) const override
 
void bind_body (Scopes &) const override
 
void emit_decl (Emitter &) const override
 
void emit_body (Emitter &) const override
 
std::ostream & stream (Tab &, std::ostream &) const override
 
- Public Member Functions inherited from mim::ast::RecDecl
 RecDecl (Loc loc, Dbg dbg, Ptr< Expr > &&type, Ptr< Expr > &&body, Ptr< RecDecl > &&next)
 
Dbg dbg () const
 
const Exprtype () const
 
const Exprbody () const
 
const RecDeclnext () const
 
void bind (Scopes &) const override
 
void emit (Emitter &) const override
 
std::ostream & stream (Tab &, std::ostream &) const override
 
- Public Member Functions inherited from mim::ast::ValDecl
- Public Member Functions inherited from mim::ast::Decl
Ref def () const
 
- 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)
 
- Protected Member Functions inherited from mim::ast::Decl
 Decl (Loc loc)
 
- Protected Member Functions inherited from mim::ast::Node
 Node (Loc loc)
 
virtual ~Node ()
 
- Protected Attributes inherited from mim::ast::Decl
Ref def_ = nullptr
 

Detailed Description

One of:

  • λ dom_0 ... dom_n-1 -> codom
  • cn dom_0 ... dom_n-1
  • fn dom_0 ... dom_n-1 -> codom
  • lam dbg dom_0 ... dom_n-1 -> codom
  • con dbg dom_0 ... dom_n-1
  • fun dbg dom_0 ... dom_n-1 -> codom

Definition at line 810 of file ast.h.

Constructor & Destructor Documentation

◆ LamDecl()

mim::ast::LamDecl::LamDecl ( Loc loc,
Tok::Tag tag,
bool is_external,
Dbg dbg,
Ptrs< Dom > && doms,
Ptr< Expr > && codom,
Ptr< Expr > && body,
Ptr< RecDecl > && next )
inline

Definition at line 831 of file ast.h.

References num_doms().

Member Function Documentation

◆ bind_body()

void mim::ast::LamDecl::bind_body ( Scopes & s) const
overridevirtual

Reimplemented from mim::ast::RecDecl.

Definition at line 315 of file bind.cpp.

References mim::ast::PiExpr::Dom::bind().

◆ bind_decl()

void mim::ast::LamDecl::bind_decl ( Scopes & s) const
overridevirtual

Reimplemented from mim::ast::RecDecl.

Definition at line 285 of file bind.cpp.

References mim::ast::Expr::bind(), mim::ast::PiExpr::Dom::bind(), and mim::ast::Node::loc().

◆ codom()

const Expr * mim::ast::LamDecl::codom ( ) const
inline

Definition at line 852 of file ast.h.

◆ dom()

const Dom * mim::ast::LamDecl::dom ( size_t i) const
inline

Definition at line 850 of file ast.h.

◆ doms()

const Ptrs< Dom > & mim::ast::LamDecl::doms ( ) const
inline

Definition at line 849 of file ast.h.

◆ emit_body()

void mim::ast::LamDecl::emit_body ( Emitter & e) const
overridevirtual

Reimplemented from mim::ast::RecDecl.

Definition at line 452 of file emit.cpp.

References mim::ast::Expr::emit().

◆ emit_decl()

void mim::ast::LamDecl::emit_decl ( Emitter & e) const
overridevirtual

◆ is_external()

bool mim::ast::LamDecl::is_external ( ) const
inline

Definition at line 848 of file ast.h.

◆ num_doms()

size_t mim::ast::LamDecl::num_doms ( ) const
inline

Definition at line 851 of file ast.h.

Referenced by LamDecl().

◆ stream()

std::ostream & mim::ast::LamDecl::stream ( Tab & tab,
std::ostream & os ) const
overridevirtual

Implements mim::ast::Node.

Definition at line 196 of file stream.cpp.

References mim::print().

◆ tag()

Tok::Tag mim::ast::LamDecl::tag ( ) const
inline

Definition at line 847 of file ast.h.


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