MimIR 0.1
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
mim::ast::Ptrn Class Referenceabstract

#include <mim/ast/ast.h>

Inheritance diagram for mim::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 mim::ast::Decl
Ref def () const
 
- Public Member Functions inherited from mim::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 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
Ref def_ = nullptr
 

Detailed Description

Definition at line 170 of file ast.h.

Constructor & Destructor Documentation

◆ Ptrn()

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

Definition at line 172 of file ast.h.

Member Function Documentation

◆ bind()

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

◆ dbg()

◆ emit_type()

virtual Ref mim::ast::Ptrn::emit_type ( Emitter & ) const
pure virtual

◆ emit_value()

◆ emit_value_()

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

Reimplemented in mim::ast::TuplePtrn.

Definition at line 188 of file ast.h.

Referenced by emit_value().

◆ rebind()

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

◆ to_expr()

Ptr< Expr > mim::ast::Ptrn::to_expr ( AST & ast,
Ptr< Ptrn > && ptrn )
staticnodiscard

Definition at line 161 of file ast.cpp.

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

◆ to_ptrn()

Ptr< Ptrn > mim::ast::Ptrn::to_ptrn ( Ptr< Expr > && expr)
staticnodiscard

Definition at line 171 of file ast.cpp.


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