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

decls e or e where decls if where is true. More...

#include <mim/ast/ast.h>

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

Public Member Functions

 DeclExpr (Loc loc, Ptrs< ValDecl > &&decls, Ptr< Expr > &&expr, bool is_where)
 
const auto & decls () const
 
bool is_where () const
 
const Exprexpr () const
 
void bind (Scopes &) const override
 
std::ostream & stream (Tab &, std::ostream &) const override
 
- Public Member Functions inherited from mim::ast::Expr
Ref emit (Emitter &) const
 
virtual Ref emit_decl (Emitter &, Ref) const
 
virtual void emit_body (Emitter &, Ref) const
 
- Public Member Functions inherited from mim::ast::Node
Loc loc () const
 
void dump () const
 

Private Member Functions

Ref emit_ (Emitter &) const override
 

Additional Inherited Members

- 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

decls e or e where decls if where is true.

Definition at line 369 of file ast.h.

Constructor & Destructor Documentation

◆ DeclExpr()

mim::ast::DeclExpr::DeclExpr ( Loc loc,
Ptrs< ValDecl > && decls,
Ptr< Expr > && expr,
bool is_where )
inline

Definition at line 371 of file ast.h.

Member Function Documentation

◆ bind()

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

Implements mim::ast::Expr.

Definition at line 130 of file bind.cpp.

References mim::ast::Expr::bind(), decls(), expr(), and is_where().

◆ decls()

const auto & mim::ast::DeclExpr::decls ( ) const
inline

Definition at line 377 of file ast.h.

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

◆ emit_()

Ref mim::ast::DeclExpr::emit_ ( Emitter & e) const
overrideprivatevirtual

Implements mim::ast::Expr.

Definition at line 173 of file emit.cpp.

References decls(), mim::ast::Expr::emit(), expr(), and is_where().

◆ expr()

const Expr * mim::ast::DeclExpr::expr ( ) const
inline

Definition at line 379 of file ast.h.

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

◆ is_where()

bool mim::ast::DeclExpr::is_where ( ) const
inline

Definition at line 378 of file ast.h.

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

◆ stream()

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

Implements mim::ast::Node.

Definition at line 95 of file stream.cpp.

References decls(), expr(), is_where(), mim::print(), and mim::Tab::println().


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