tan  0.0.1
tanlang::Cast Class Reference
Inheritance diagram for tanlang::Cast:
Collaboration diagram for tanlang::Cast:

Public Member Functions

Exprget_lhs () const
 
void set_lhs (Expr *lhs)
 
vector< ASTBase * > get_children () const override
 Get a ordered list of child nodes. More...
 
bool is_lvalue () override
 
void set_lvalue (bool is_lvalue) override
 
bool is_comptime_known () override
 
- Public Member Functions inherited from tanlang::Expr
bool is_expr () const override
 
bool is_stmt () const override
 
- Public Member Functions inherited from tanlang::ASTBase
 ASTBase (ASTNodeType node_type, TokenizedSourceFile *src, int bp)
 
ASTNodeType get_node_type () const
 
void set_node_type (ASTNodeType node_type)
 
int get_bp () const
 
Contextctx ()
 
str repr (const str &prefix="-") const
 AST tree string representation. More...
 
virtual str terminal_token () const
 Which terminal token is expected immediately after this node. More...
 
- Public Member Functions inherited from tanlang::SourceTraceable
 SourceTraceable (TokenizedSourceFile *src)
 
uint32_t start () const
 
uint32_t end () const
 
void set_start (uint32_t val)
 
void set_end (uint32_t val)
 
TokenizedSourceFilesrc () const
 
- Public Member Functions inherited from tanlang::Typed
virtual Typeget_type () const
 
virtual void set_type (Type *type)
 

Static Public Member Functions

static CastCreate (TokenizedSourceFile *src)
 

Protected Member Functions

 Cast (TokenizedSourceFile *src)
 
- Protected Member Functions inherited from tanlang::Expr
 Expr (ASTNodeType type, TokenizedSourceFile *src, int bp)
 
- Protected Member Functions inherited from tanlang::ASTBase
virtual str to_string (bool include_source_code=false) const
 Different from repr, to_string output doesn't include child nodes. More...
 
virtual ASTBaseget () const
 Get the "actual" this. Used for implementing proxy classes. More...
 

Protected Attributes

Expr_lhs = nullptr
 
- Protected Attributes inherited from tanlang::Expr
bool _is_lvalue = false
 

Additional Inherited Members

- Static Public Attributes inherited from tanlang::ASTBase
static umap< ASTNodeType, str > ASTTypeNames
 string representation of ASTNodeType More...
 
static umap< ASTNodeType, int > OpPrecedence
 operator precedence of tokens More...
 

Detailed Description

Definition at line 367 of file expr.h.

Member Function Documentation

◆ get_children()

vector< ASTBase * > Cast::get_children ( ) const
overridevirtual

Get a ordered list of child nodes.

Reimplemented from tanlang::Expr.

Definition at line 301 of file expr.cpp.

◆ get_lhs()

Expr * Cast::get_lhs ( ) const

Cast

Definition at line 289 of file expr.cpp.


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