MimIR
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
mim::ast::LitExpr Class Reference

tok:type More...

#include <mim/ast/ast.h>

Inheritance diagram for mim::ast::LitExpr:
[legend]

Public Member Functions

 LitExpr (Loc loc, Tok tok, Ptr< Expr > type)
Tok tok () const
Tok::Tag tag () const
const Exprtype () const
void bind (Scopes &) const override
void stream (fe::Tab &, std::ostream &) const override
Public Member Functions inherited from mim::ast::Expr
const Defemit (Emitter &) const
const Defemit_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 Defemit_ (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)

Detailed Description

tok:type

Definition at line 510 of file ast.h.

Constructor & Destructor Documentation

◆ LitExpr()

mim::ast::LitExpr::LitExpr ( Loc loc,
Tok tok,
Ptr< Expr > type )
inline

Definition at line 512 of file ast.h.

References mim::ast::Expr::Expr(), mim::ast::Node::loc(), tok(), and type().

Member Function Documentation

◆ bind()

void mim::ast::LitExpr::bind ( Scopes & s) const
overridevirtual

Implements mim::ast::Expr.

Definition at line 225 of file bind.cpp.

References mim::ast::Expr::bind(), C_LIT_TYPED, ISA, mim::ast::Node::loc(), tag(), and type().

◆ emit_()

const Def * mim::ast::LitExpr::emit_ ( Emitter & e) const
overrideprivatevirtual

◆ stream()

void mim::ast::LitExpr::stream ( fe::Tab & tab,
std::ostream & os ) const
overridevirtual

Implements mim::ast::Node.

Definition at line 110 of file stream.cpp.

References mim::ast::Tok::lit_i(), mim::ast::Tok::lit_u(), mim::ast::S::S(), tag(), tok(), and type().

◆ tag()

Tok::Tag mim::ast::LitExpr::tag ( ) const
inline

Definition at line 518 of file ast.h.

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

◆ tok()

Tok mim::ast::LitExpr::tok ( ) const
inline

Definition at line 517 of file ast.h.

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

◆ type()

const Expr * mim::ast::LitExpr::type ( ) const
inline

Definition at line 519 of file ast.h.

References mim::ast::Expr::Expr().

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


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