Thorin 1.9.0
The Higher ORder INtermediate representation
Loading...
Searching...
No Matches
thorin::ast::LamDecl Class Reference

One of: More...

#include <thorin/ast/ast.h>

Inheritance diagram for thorin::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 thorin::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 thorin::ast::Decl
Ref def () const
 
- Public Member Functions inherited from thorin::ast::Node
Loc loc () const
 
void dump () const
 

Additional Inherited Members

- Protected Member Functions inherited from thorin::ast::ValDecl
 ValDecl (Loc loc)
 
- Protected Member Functions inherited from thorin::ast::Decl
 Decl (Loc loc)
 
- Protected Member Functions inherited from thorin::ast::Node
 Node (Loc loc)
 
virtual ~Node ()
 
- Protected Attributes inherited from thorin::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 816 of file ast.h.

Constructor & Destructor Documentation

◆ LamDecl()

thorin::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 837 of file ast.h.

References num_doms().

Member Function Documentation

◆ bind_body()

void thorin::ast::LamDecl::bind_body ( Scopes s) const
overridevirtual

Reimplemented from thorin::ast::RecDecl.

Definition at line 320 of file bind.cpp.

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

◆ bind_decl()

void thorin::ast::LamDecl::bind_decl ( Scopes s) const
overridevirtual

◆ codom()

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

Definition at line 858 of file ast.h.

◆ dom()

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

Definition at line 856 of file ast.h.

◆ doms()

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

Definition at line 855 of file ast.h.

◆ emit_body()

void thorin::ast::LamDecl::emit_body ( Emitter e) const
overridevirtual

Reimplemented from thorin::ast::RecDecl.

Definition at line 445 of file emit.cpp.

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

◆ emit_decl()

void thorin::ast::LamDecl::emit_decl ( Emitter e) const
overridevirtual

◆ is_external()

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

Definition at line 854 of file ast.h.

◆ num_doms()

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

Definition at line 857 of file ast.h.

Referenced by LamDecl().

◆ stream()

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

Implements thorin::ast::Node.

Definition at line 195 of file stream.cpp.

References thorin::print().

◆ tag()

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

Definition at line 853 of file ast.h.


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