MimIR 0.1
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
 
std::ostream & stream (Tab &, std::ostream &) const override
 
- Public Member Functions inherited from mim::ast::Expr
Ref emit (Emitter &) const
 
virtual Ref emit_decl (Emitter &, Ref) const
 
virtual void emit_body (Emitter &, Ref) const
 
- Public Member Functions inherited from mim::ast::Node
Loc loc () const
 
void dump () const
 

Private Member Functions

Ref 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)
 
virtual ~Node ()
 

Detailed Description

tok:type

Definition at line 347 of file ast.h.

Constructor & Destructor Documentation

◆ LitExpr()

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

Definition at line 349 of file ast.h.

Member Function Documentation

◆ bind()

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

Implements mim::ast::Expr.

Definition at line 120 of file bind.cpp.

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

◆ emit_()

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

Implements mim::ast::Expr.

Definition at line 156 of file emit.cpp.

References mim::ast::Expr::emit(), mim::ast::Tok::lit_i(), tag(), tok(), and type().

◆ stream()

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

Implements mim::ast::Node.

Definition at line 81 of file stream.cpp.

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

◆ tag()

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

Definition at line 355 of file ast.h.

References mim::ast::Tok::tag().

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

◆ tok()

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

Definition at line 354 of file ast.h.

Referenced by emit_(), and stream().

◆ type()

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

Definition at line 356 of file ast.h.

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


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