match scrutinee with | arm_0 | ... | arm_n-1 More...
#include <mim/ast/ast.h>
Classes | |
| class | Arm |
| ptrn => body of a MatchExpr. More... | |
Public Types | |
| using | VLA_Types = std::tuple<Ptr<Arm>> |
Public Member Functions | |
| MatchExpr (Loc loc, Ptr< Expr > scrutinee) | |
| const Expr * | scrutinee () const |
| auto | arms () const |
| const Arm * | arm (size_t i) const |
| size_t | num_arms () const |
| void | bind (Scopes &) const override |
| void | stream (fe::Tab &, std::ostream &) const override |
| Public Member Functions inherited from mim::ast::Expr | |
| const Def * | emit (Emitter &) const |
| const Def * | emit_decl (Emitter &, const Def *type) const |
| void | emit_body (Emitter &, const Def *decl) const |
| Public Member Functions inherited from mim::ast::Node | |
| Loc | loc () const |
| void | dump () const |
Private Member Functions | |
| const Def * | 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) | |
| using mim::ast::MatchExpr::VLA_Types = std::tuple<Ptr<Arm>> |
Definition at line 658 of file ast.h.
References mim::ast::Expr::Expr(), mim::ast::Node::loc(), and scrutinee().
|
inline |
|
inline |
|
overridevirtual |
Implements mim::ast::Expr.
Definition at line 261 of file bind.cpp.
References arm(), arms(), mim::ast::Expr::bind(), mim::ast::MatchExpr::Arm::bind(), and scrutinee().
Implements mim::ast::Expr.
Definition at line 362 of file emit.cpp.
References arm(), arms(), mim::ast::Expr::emit(), mim::ast::MatchExpr::Arm::emit(), and scrutinee().
|
inline |
|
inline |
Definition at line 662 of file ast.h.
References mim::ast::Expr::Expr().
Referenced by bind(), emit_(), MatchExpr(), and stream().
|
overridevirtual |
Implements mim::ast::Node.
Definition at line 150 of file stream.cpp.
References arm(), arms(), mim::ast::S::S(), and scrutinee().