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

#include <thorin/ast/ast.h>

Inheritance diagram for thorin::ast::Ptrn:
[legend]

Public Member Functions

 Ptrn (Loc loc, bool rebind, Dbg dbg)
 
bool rebind () const
 
Dbg dbg () const
 
virtual void bind (Scopes &, bool quiet=false) const =0
 
Ref emit_value (Emitter &, Ref) const
 
virtual Ref emit_type (Emitter &) const =0
 
- Public Member Functions inherited from thorin::ast::Decl
Ref def () const
 
- Public Member Functions inherited from thorin::ast::Node
Loc loc () const
 
virtual std::ostream & stream (Tab &, std::ostream &) const =0
 
void dump () const
 

Static Public Member Functions

static Ptr< Exprto_expr (AST &, Ptr< Ptrn > &&)
 
static Ptr< Ptrnto_ptrn (Ptr< Expr > &&)
 

Private Member Functions

virtual void emit_value_ (Emitter &, Ref) const
 

Additional Inherited Members

- Protected Member Functions inherited from thorin::ast::Decl
 Decl (Loc loc)
 
- Protected Member Functions inherited from thorin::ast::Node
 Node (Loc loc)
 
virtual ~Node ()
 
- Protected Attributes inherited from thorin::ast::Decl
Ref def_ = nullptr
 

Detailed Description

Definition at line 171 of file ast.h.

Constructor & Destructor Documentation

◆ Ptrn()

thorin::ast::Ptrn::Ptrn ( Loc  loc,
bool  rebind,
Dbg  dbg 
)
inline

Definition at line 173 of file ast.h.

Member Function Documentation

◆ bind()

virtual void thorin::ast::Ptrn::bind ( Scopes ,
bool  quiet = false 
) const
pure virtual

◆ dbg()

◆ emit_type()

virtual Ref thorin::ast::Ptrn::emit_type ( Emitter ) const
pure virtual

◆ emit_value()

◆ emit_value_()

virtual void thorin::ast::Ptrn::emit_value_ ( Emitter ,
Ref   
) const
inlineprivatevirtual

Reimplemented in thorin::ast::TuplePtrn.

Definition at line 189 of file ast.h.

Referenced by emit_value().

◆ rebind()

bool thorin::ast::Ptrn::rebind ( ) const
inline

◆ to_expr()

Ptr< Expr > thorin::ast::Ptrn::to_expr ( AST ast,
Ptr< Ptrn > &&  ptrn 
)
static

Definition at line 161 of file ast.cpp.

References thorin::ast::TuplePtrn::is_brckt(), and thorin::ast::AST::ptr().

◆ to_ptrn()

Ptr< Ptrn > thorin::ast::Ptrn::to_ptrn ( Ptr< Expr > &&  expr)
static

Definition at line 171 of file ast.cpp.


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