Table of Contents

Class ExpressionNode

Namespace
OpenLanguage.SpreadsheetML.Formula.Ast
Assembly
OpenLanguage.dll

Represents a node that can be evaluated to a value. This base class now includes properties to retain all surrounding whitespace for lossless parsing.

public abstract class ExpressionNode : Node
Inheritance
ExpressionNode
Derived
Inherited Members

Constructors

ExpressionNode(List<Node>?, List<Node>?)

protected ExpressionNode(List<Node>? leadingWhitespace = null, List<Node>? trailingWhitespace = null)

Parameters

leadingWhitespace List<Node>
trailingWhitespace List<Node>

Properties

LeadingWhitespace

Whitespace characters that appeared before this expression in the original formula.

public List<Node> LeadingWhitespace { get; set; }

Property Value

List<Node>

Precedence

Gets the operator precedence for this expression node.

public abstract int Precedence { get; }

Property Value

int

TrailingWhitespace

Whitespace characters that appeared after this expression in the original formula.

public List<Node> TrailingWhitespace { get; set; }

Property Value

List<Node>

Methods

ToRawString()

Renders the core content of the node without its own leading/trailing whitespace.

public abstract string ToRawString()

Returns

string

The raw string representation of this node's specific content.

ToString()

Converts the AST node back into its string representation, including all captured whitespace.

public override sealed string ToString()

Returns

string