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

let ptrn: type = value; More...

#include <mim/ast/ast.h>

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

Public Member Functions

 LetDecl (Loc loc, Ptr< Ptrn > &&ptrn, Ptr< Expr > &&value)
 
const Ptrnptrn () const
 
const Exprvalue () 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

let ptrn: type = value;

Definition at line 695 of file ast.h.

Constructor & Destructor Documentation

◆ LetDecl()

mim::ast::LetDecl::LetDecl ( Loc loc,
Ptr< Ptrn > && ptrn,
Ptr< Expr > && value )
inline

Definition at line 697 of file ast.h.

Member Function Documentation

◆ bind()

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

Implements mim::ast::ValDecl.

Definition at line 252 of file bind.cpp.

◆ emit()

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

Implements mim::ast::ValDecl.

Definition at line 387 of file emit.cpp.

◆ ptrn()

const Ptrn * mim::ast::LetDecl::ptrn ( ) const
inline

Definition at line 702 of file ast.h.

◆ stream()

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

Implements mim::ast::Node.

Definition at line 179 of file stream.cpp.

References mim::print().

◆ value()

const Expr * mim::ast::LetDecl::value ( ) const
inline

Definition at line 703 of file ast.h.


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