#include <ast.hpp>
Abstract syntax tree node representing ternary operator Q ? T : F.
Public Fields | |
| integer | ColonPosition |
| The index of the colon in the expression string. | |
| AST * | F |
| The false-result. | |
| AST * | Q |
| The question. | |
| AST * | T |
| The true-result. | |
Public Fields inherited from AST | |
| Types | NodeType |
| integer | Position |
Public Methods | |
| ASTConditional (AST *q, AST *t, AST *f, integer position, integer colonPosition) | |
| virtual | ~ASTConditional () override |
| virtual void | Assemble (Program &program, MonoAllocator &allocator, AString &normalized) override |
| virtual AST * | Optimize (Normalization normalization) override |
Public Methods inherited from AST | |
| AST ()=delete | |
| AST (Types type, integer position) | |
| virtual | ~AST () |
Additional Inherited Members | |
Public Types inherited from AST | |
| enum | Types { Literal, Identifier, Function, UnaryOp, BinaryOp, TernaryOp } |
|
inlineoverridevirtual |
|
overridevirtual |
Implements abstract method.
| program | The program to be compiled. | |
| allocator | An allocator usable for temporary objects. | |
| [out] | normalized | The normalized string, built during recursive compilation of the AST. |
Implements AST.
Definition at line 546 of file ast.cpp.
|
overridevirtual |