Abstract syntax tree node representing ternary operator Q ? T : F
.
Definition at line 243 of file ast_impl.inl.
Public Field Index: | |
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. | |
![]() | |
integer | Position |
Position in the original expression string. | |
![]() | |
Types | NodeType |
Type of derived this AST node. | |
Public Method Index: | |
ASTConditional (AST *q, AST *t, AST *f, integer position, integer colonPosition) | |
virtual | ~ASTConditional () override |
Virtual destructor. | |
virtual void | Assemble (Program &program, MonoAllocator &allocator, AString &normalized) override |
virtual AST * | Optimize (Normalization normalization) override |
![]() | |
AST ()=delete | |
Deleted default constructor. | |
AST (Types type, integer position) | |
virtual | ~AST () |
Virtual destructor. | |
![]() | |
ASTBase (Types type) | |
Additional Inherited Members | |
![]() | |
enum class | Types { Literal , Identifier , Function , UnaryOp , BinaryOp , TernaryOp } |
The type of node. More... | |
integer alib::expressions::detail::ASTConditional::ColonPosition |
The index of the colon in the expression string.
Definition at line 248 of file ast_impl.inl.
AST* alib::expressions::detail::ASTConditional::F |
The false-result.
Definition at line 247 of file ast_impl.inl.
AST* alib::expressions::detail::ASTConditional::Q |
The question.
Definition at line 245 of file ast_impl.inl.
AST* alib::expressions::detail::ASTConditional::T |
The true-result.
Definition at line 246 of file ast_impl.inl.
|
inlineexplicit |
Constructor providing all fields.
q | The question. |
t | The true-result. |
f | The false-result. |
position | The index of the question mark in the expression string. |
colonPosition | The index of the colon in the expression string. |
Definition at line 257 of file ast_impl.inl.
|
inlineoverridevirtual |
Virtual destructor.
Definition at line 264 of file ast_impl.inl.
|
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 alib::expressions::detail::AST.
Definition at line 539 of file ast.cpp.
|
overridevirtual |
Implements abstract method.
normalization | The compiler flags denoting the normalization settings. |
Implements alib::expressions::detail::AST.
Definition at line 76 of file ast.cpp.