lhs op rhs; InfixExpr::op picks the meaning - see MIM_INFIX. More...
#include <mim/ast/ast.h>
Public Member Functions | |
| InfixExpr (Loc loc, Ptr< Expr > lhs, Tok op, Ptr< Expr > rhs, Ptr< Expr > callee) | |
callee is the `op a MIM_INFIX_SUGAR operator desugars to and nullptr for MIM_INFIX_CORE. | |
| const Expr * | lhs () const |
| Tok | op () const |
| const Expr * | rhs () const |
| const Expr * | callee () 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 |
Static Public Member Functions | |
| static const InfixExpr * | isa_op (Tok::Tag tag, const Expr *expr) |
Private Member Functions | |
| const Def * | emit_ (Emitter &) const override |
| const Def * | emit_decl_ (Emitter &, const Def *type) const override |
| void | emit_body_ (Emitter &, const Def *decl) 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) | |
|
inline |
callee is the `op a MIM_INFIX_SUGAR operator desugars to and nullptr for MIM_INFIX_CORE.
Definition at line 597 of file ast.h.
References callee(), mim::ast::Expr::Expr(), lhs(), mim::ast::Node::loc(), op(), and rhs().
Referenced by isa_op().
|
overridevirtual |
Implements mim::ast::Expr.
Definition at line 244 of file bind.cpp.
References mim::ast::Expr::bind(), callee(), lhs(), op(), and rhs().
|
inline |
Definition at line 607 of file ast.h.
References mim::ast::Expr::Expr().
Referenced by bind(), emit_(), and InfixExpr().
Implements mim::ast::Expr.
Definition at line 297 of file emit.cpp.
References callee(), mim::ast::Expr::emit(), mim::ast::emit_union(), isa_op(), lhs(), mim::ast::Node::loc(), op(), rhs(), and mim::ast::Tok::tag2str().
Reimplemented from mim::ast::Expr.
Definition at line 265 of file emit.cpp.
References mim::ast::Expr::emit(), lhs(), and rhs().
expr if it is an InfixExpr whose operator is tag. Definition at line 610 of file ast.h.
References mim::ast::Expr::Expr(), and InfixExpr().
Referenced by mim::ast::AxmDecl::bind(), mim::ast::RecDecl::bind_decl(), emit_(), and mim::ast::emit_union().
|
inline |
Definition at line 604 of file ast.h.
References mim::ast::Expr::Expr().
Referenced by bind(), emit_(), emit_body_(), InfixExpr(), and stream().
|
inline |
Definition at line 605 of file ast.h.
Referenced by bind(), emit_(), emit_decl_(), InfixExpr(), and stream().
|
inline |
Definition at line 606 of file ast.h.
References mim::ast::Expr::Expr().
Referenced by bind(), emit_(), emit_body_(), InfixExpr(), and stream().
|
overridevirtual |
Implements mim::ast::Node.
Definition at line 142 of file stream.cpp.
References lhs(), op(), rhs(), mim::ast::S::S(), and mim::ast::Tok::tag2str().