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::Decl
const Defdef () 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
const Defdef_ = nullptr

Detailed Description

let ptrn: type = value;

Definition at line 837 of file ast.h.

Constructor & Destructor Documentation

◆ LetDecl()

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

Definition at line 839 of file ast.h.

References mim::ast::Node::loc(), ptrn(), mim::ast::ValDecl::ValDecl(), and value().

Member Function Documentation

◆ bind()

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

Implements mim::ast::ValDecl.

Definition at line 305 of file bind.cpp.

References ptrn(), and value().

◆ emit()

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

Implements mim::ast::ValDecl.

Definition at line 427 of file emit.cpp.

References mim::ast::Decl::def_, ptrn(), and value().

◆ ptrn()

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

Definition at line 844 of file ast.h.

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

◆ stream()

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

Implements mim::ast::Node.

Definition at line 202 of file stream.cpp.

References mim::print(), ptrn(), and value().

◆ value()

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

Definition at line 845 of file ast.h.

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


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