Thorin 1.9.0
The Higher ORder INtermediate representation
Loading...
Searching...
No Matches
thorin::ast::LitExpr Class Reference

tok:type More...

#include <thorin/ast/ast.h>

Inheritance diagram for thorin::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 thorin::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 thorin::ast::Node
Loc loc () const
 
void dump () const
 

Private Member Functions

Ref emit_ (Emitter &) const override
 

Additional Inherited Members

- Protected Member Functions inherited from thorin::ast::Expr
 Expr (Loc loc)
 
- Protected Member Functions inherited from thorin::ast::Node
 Node (Loc loc)
 
virtual ~Node ()
 

Detailed Description

tok:type

Definition at line 337 of file ast.h.

Constructor & Destructor Documentation

◆ LitExpr()

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

Definition at line 339 of file ast.h.

Member Function Documentation

◆ bind()

void thorin::ast::LitExpr::bind ( Scopes s) const
overridevirtual

Implements thorin::ast::Expr.

Definition at line 118 of file bind.cpp.

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

◆ emit_()

Ref thorin::ast::LitExpr::emit_ ( Emitter e) const
overrideprivatevirtual

Implements thorin::ast::Expr.

Definition at line 154 of file emit.cpp.

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

◆ stream()

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

Implements thorin::ast::Node.

Definition at line 78 of file stream.cpp.

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

◆ tag()

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

Definition at line 345 of file ast.h.

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

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

◆ tok()

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

Definition at line 344 of file ast.h.

Referenced by emit_(), and stream().

◆ type()

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

Definition at line 346 of file ast.h.

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


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