Base class for AST nodes. More...
#include <cctype>
#include <cstdint>
#include <memory>
#include <string>
#include <type_traits>
#include <unordered_map>
#include "tcalc/common.hpp"
Go to the source code of this file.
Classes | |
class | tcalc::ast::Node |
Base class for AST nodes. More... | |
Typedefs | |
template<typename NT = Node, typename = std::enable_if_t<std::is_base_of_v<Node, NT>>> | |
using | tcalc::ast::NodePtr = std::shared_ptr< NT > |
Shared pointer to a node. | |
Enumerations | |
enum class | tcalc::ast::NodeType : uint8_t { BINARY_PLUS , BINARY_MINUS , BINARY_MULTIPLY , BINARY_DIVIDE , BINARY_EQUAL , BINARY_NOT_EQUAL , BINARY_GREATER , BINARY_GREATER_EQUAL , BINARY_LESS , BINARY_LESS_EQUAL , BINARY_AND , BINARY_OR , UNARY_PLUS , UNARY_MINUS , UNARY_NOT , NUMBER , VARREF , VARASSIGN , FCALL , FDEF , IF , PROGRAM , IMPORT } |
AST node type. More... | |
Variables | |
const std::unordered_map< NodeType, std::string > | tcalc::ast::NODE_TYPE_NAMES |
Base class for AST nodes.
using tcalc::ast::NodePtr = typedef std::shared_ptr<NT> |
Shared pointer to a node.
NT | Node type. |
|
strong |
AST node type.
|
inline |
Node type names.