ALib C++ Library
Library Version: 2510 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
ast.inl
Go to the documentation of this file.
1//==================================================================================================
2/// \file
3/// This header-file is part of module \alib_expressions of the \aliblong.
4///
5/// \emoji :copyright: 2013-2025 A-Worx GmbH, Germany.
6/// Published under \ref mainpage_license "Boost Software License".
7//==================================================================================================
8ALIB_EXPORT namespace alib { namespace expressions { namespace detail {
9
10/// Base class for nodes of abstract syntax trees of module \alib_expressions.
11/// Note that AST objects (and their data) are allocated in a \alib{MonoAllocator} and
12/// hence have empty destructors.
13struct ASTBase
14{
15 /// The type of node.
16 enum class Types
17 {
18 Literal , ///< A literal.
19 Identifier , ///< An identifier.
20 Function , ///< A function.
21 UnaryOp , ///< A unary operator.
22 BinaryOp , ///< A binary operator.
23 TernaryOp , ///< A ternary operator.
24 };
25
26 /// Type of derived this AST node
28
29 /// Constructor
30 /// @param type The node type.
31 ASTBase( Types type )
32 : NodeType(type)
33 {}
34};
35
36}}} // namespace [alib::expressions::detail]
#define ALIB_EXPORT
Definition alib.inl:488
Types NodeType
Type of derived this AST node.
Definition ast.inl:27