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

value inj t1 ∪ t2 More...

#include <mim/ast/ast.h>

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

Public Member Functions

 InjExpr (Loc loc, Ptr< Expr > &&value, Ptr< Expr > &&type)
 
const Exprvalue () const
 
const Exprtype () const
 
void bind (Scopes &) const override
 
std::ostream & stream (Tab &, std::ostream &) const override
 
- Public Member Functions inherited from mim::ast::Expr
const Defemit (Emitter &) const
 
virtual const Defemit_decl (Emitter &, const Def *) const
 
virtual void emit_body (Emitter &, const Def *) const
 
- Public Member Functions inherited from mim::ast::Node
Loc loc () const
 
void dump () const
 

Private Member Functions

const Defemit_ (Emitter &) const override
 

Additional Inherited Members

enum class  Prec {
  Err ,
  Bot ,
  Where ,
  Arrow ,
  Pi ,
  Inj ,
  App ,
  Union ,
  Extract ,
  Lit
}
 
static constexpr bool is_rassoc (Prec p)
 
- Protected Member Functions inherited from mim::ast::Expr
 Expr (Loc loc)
 
- Protected Member Functions inherited from mim::ast::Node
 Node (Loc loc)
 
virtual ~Node ()
 

Detailed Description

value inj t1 ∪ t2

Definition at line 473 of file ast.h.

Constructor & Destructor Documentation

◆ InjExpr()

mim::ast::InjExpr::InjExpr ( Loc loc,
Ptr< Expr > && value,
Ptr< Expr > && type )
inline

Definition at line 475 of file ast.h.

References mim::ast::Expr::Expr(), mim::ast::Node::loc(), type(), and value().

Member Function Documentation

◆ bind()

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

Implements mim::ast::Expr.

Definition at line 150 of file bind.cpp.

References mim::ast::Expr::bind(), type(), and value().

◆ emit_()

const Def * mim::ast::InjExpr::emit_ ( Emitter & e) const
overrideprivatevirtual

Implements mim::ast::Expr.

Definition at line 216 of file emit.cpp.

References mim::ast::Expr::emit(), type(), and value().

◆ stream()

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

Implements mim::ast::Node.

Definition at line 114 of file stream.cpp.

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

◆ type()

const Expr * mim::ast::InjExpr::type ( ) const
inline

Definition at line 481 of file ast.h.

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

Referenced by bind(), emit_(), InjExpr(), and stream().

◆ value()

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

Definition at line 480 of file ast.h.

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

Referenced by bind(), emit_(), InjExpr(), and stream().


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