OpenXLSX 1.9.1
Loading...
Searching...
No Matches
OpenXLSX::XLASTNode Struct Reference

Polymorphic AST node. Uses a tagged-union approach with std::unique_ptr children. More...

#include <XLFormulaEngine.hpp>

Public Member Functions

 XLASTNode (XLNodeKind k)
 
 XLASTNode (const XLASTNode &)=delete
 
XLASTNodeoperator= (const XLASTNode &)=delete
 
 XLASTNode (XLASTNode &&)=default
 
XLASTNodeoperator= (XLASTNode &&)=default
 

Data Fields

XLNodeKind kind
 
double number {0.0}
 
std::string text
 string literal, cell-ref text, range text, identifier, error text
 
bool boolean {false}
 
XLTokenKind op {XLTokenKind::Error}
 operator for BinOp / UnaryOp
 
std::vector< std::unique_ptr< XLASTNode > > children
 operands or function arguments
 

Detailed Description

Polymorphic AST node. Uses a tagged-union approach with std::unique_ptr children.

All fields are public for simplicity; the AST is an internal implementation detail.

Constructor & Destructor Documentation

◆ XLASTNode() [1/3]

OpenXLSX::XLASTNode::XLASTNode ( XLNodeKind  k)
inlineexplicit

◆ XLASTNode() [2/3]

OpenXLSX::XLASTNode::XLASTNode ( const XLASTNode )
delete

◆ XLASTNode() [3/3]

OpenXLSX::XLASTNode::XLASTNode ( XLASTNode &&  )
default

Member Function Documentation

◆ operator=() [1/2]

XLASTNode & OpenXLSX::XLASTNode::operator= ( const XLASTNode )
delete

◆ operator=() [2/2]

XLASTNode & OpenXLSX::XLASTNode::operator= ( XLASTNode &&  )
default

Field Documentation

◆ boolean

bool OpenXLSX::XLASTNode::boolean {false}

◆ children

std::vector<std::unique_ptr<XLASTNode> > OpenXLSX::XLASTNode::children

operands or function arguments

◆ kind

XLNodeKind OpenXLSX::XLASTNode::kind

◆ number

double OpenXLSX::XLASTNode::number {0.0}

◆ op

XLTokenKind OpenXLSX::XLASTNode::op {XLTokenKind::Error}

operator for BinOp / UnaryOp

◆ text

std::string OpenXLSX::XLASTNode::text

string literal, cell-ref text, range text, identifier, error text


The documentation for this struct was generated from the following file: