Abstract syntax tree node representing identifiers.
Definition at line 52 of file ast_impl.inl.
Public Type Index: | |
enum class | NFHint { NONE , Scientific , Hexadecimal , Octal , Binary } |
![]() | |
enum class | Types { Literal , Identifier , Function , UnaryOp , BinaryOp , TernaryOp } |
The type of node. More... | |
Public Field Index: | |
NFHint | Format |
Format hints. | |
Box | Value |
The value of the literal. | |
![]() | |
integer | Position |
Position in the original expression string. | |
![]() | |
Types | NodeType |
Type of derived this AST node. | |
Public Method Index: | |
ASTLiteral (const String &string, integer position) | |
ASTLiteral (double value, integer position, NFHint hint=NFHint::NONE) | |
ASTLiteral (integer value, integer position, NFHint hint=NFHint::NONE) | |
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) | |
|
strong |
This is a list of flags that store information obbout the format of the literal given in the expression string. This information is used with the generation of a normalized version of the literal.
Definition at line 57 of file ast_impl.inl.
NFHint alib::expressions::detail::ASTLiteral::Format |
Format hints.
Definition at line 67 of file ast_impl.inl.
Box alib::expressions::detail::ASTLiteral::Value |
The value of the literal.
Definition at line 66 of file ast_impl.inl.
|
inline |
Constructs a string literal.
string | The value of the literal. |
position | The index of this AST in the expression string. |
Definition at line 72 of file ast_impl.inl.
|
inline |
Constructs an integer literal.
value | The value of the literal. |
position | The index of this AST in the expression string. |
hint | A hint about the format that expression string used to express the literal. |
Definition at line 83 of file ast_impl.inl.
|
inline |
Constructs a floating point literal.
value | The value of the literal. |
position | The index of this AST in the expression string. |
hint | Optional information about the number format that was detected while parsing. |
Definition at line 94 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 123 of file ast.cpp.
|
overridevirtual |
Implements abstract method.
normalization | The compiler flags denoting the normalization settings. |
Implements alib::expressions::detail::AST.
Definition at line 60 of file ast.cpp.