Abstract syntax tree node representing identifiers.
Definition at line 51 of file ast_impl.inl.
Public Type Index: | |
| enum class | NFHint { NONE , Scientific , Hexadecimal , Octal , Binary } |
Public Type Index: inherited from alib::expressions::detail::ASTBase | |
| 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. | |
Public Field Index: inherited from alib::expressions::detail::AST | |
| integer | Position |
| Position in the original expression string. | |
Public Field Index: inherited from alib::expressions::detail::ASTBase | |
| 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 |
Public Method Index: inherited from alib::expressions::detail::AST | |
| AST ()=delete | |
| Deleted default constructor. | |
| AST (Types type, integer position) | |
| virtual | ~AST () |
| Virtual destructor. | |
Public Method Index: inherited from alib::expressions::detail::ASTBase | |
| 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 56 of file ast_impl.inl.
| NFHint alib::expressions::detail::ASTLiteral::Format |
Format hints.
Definition at line 66 of file ast_impl.inl.
| Box alib::expressions::detail::ASTLiteral::Value |
The value of the literal.
Definition at line 65 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 71 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 80 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 88 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 112 of file ast.cpp.
|
overridevirtual |
Implements abstract method.
| normalization | The compiler flags denoting the normalization settings. |
Implements alib::expressions::detail::AST.
Definition at line 59 of file ast.cpp.