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

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

#include <thorin/ast/ast.h>

Inheritance diagram for thorin::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 thorin::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 thorin::ast::Node
Loc loc () const
 
void dump () const
 

Private Member Functions

Ref emit_ (Emitter &) const override
 

Additional Inherited Members

- Protected Member Functions inherited from thorin::ast::Expr
 Expr (Loc loc)
 
- Protected Member Functions inherited from thorin::ast::Node
 Node (Loc loc)
 
virtual ~Node ()
 

Detailed Description

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

Definition at line 378 of file ast.h.

Constructor & Destructor Documentation

◆ DeclExpr()

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

Definition at line 380 of file ast.h.

Member Function Documentation

◆ bind()

void thorin::ast::DeclExpr::bind ( Scopes s) const
overridevirtual

Implements thorin::ast::Expr.

Definition at line 128 of file bind.cpp.

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

◆ decls()

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

Definition at line 386 of file ast.h.

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

◆ emit_()

Ref thorin::ast::DeclExpr::emit_ ( Emitter e) const
overrideprivatevirtual

Implements thorin::ast::Expr.

Definition at line 171 of file emit.cpp.

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

◆ expr()

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

Definition at line 388 of file ast.h.

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

◆ is_where()

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

Definition at line 387 of file ast.h.

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

◆ stream()

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

Implements thorin::ast::Node.

Definition at line 92 of file stream.cpp.

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


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