MXVM 1.8.1
Virtual Machine, Compiler, and Pascal Frontend
Loading...
Searching...
No Matches
mxvm::ExpressionNode Class Reference

AST node for a literal expression value. More...

#include <ast.hpp>

Inheritance diagram for mxvm::ExpressionNode:

Public Member Functions

 ExpressionNode (const std::string &val, bool numeric=false)
void accept (ASTVisitor &visitor) override
std::string toString () const override
Public Member Functions inherited from mxvm::ASTNode
virtual ~ASTNode ()=default

Public Attributes

std::string value
bool isNumeric

Detailed Description

AST node for a literal expression value.

Definition at line 143 of file ast.hpp.

Constructor & Destructor Documentation

◆ ExpressionNode()

mxvm::ExpressionNode::ExpressionNode ( const std::string & val,
bool numeric = false )
inline

Definition at line 148 of file ast.hpp.

References isNumeric, and value.

Member Function Documentation

◆ accept()

void mxvm::ExpressionNode::accept ( ASTVisitor & visitor)
overridevirtual

Implements mxvm::ASTNode.

Definition at line 95 of file ast.cpp.

References mxvm::ASTVisitor::visit().

◆ toString()

std::string mxvm::ExpressionNode::toString ( ) const
overridevirtual

Implements mxvm::ASTNode.

Definition at line 99 of file ast.cpp.

References isNumeric, and value.

Member Data Documentation

◆ isNumeric

bool mxvm::ExpressionNode::isNumeric

Definition at line 146 of file ast.hpp.

Referenced by ExpressionNode(), and toString().

◆ value

std::string mxvm::ExpressionNode::value

Definition at line 145 of file ast.hpp.

Referenced by ExpressionNode(), and toString().


The documentation for this class was generated from the following files: