Unit 'fpexprpars' Package
[Overview][Constants][Types][Classes][Procedures and functions][Index] [#fcl]

TFPExprNode

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Class for representing nodes in expression trees

Declaration

Source position: fpexprpars.pp line 113

type TFPExprNode = class(TObject)

public

  procedure Check; virtual; abstract;

  

Validate the expression node for correctness

  procedure InitAggregate; virtual;

  

Initialize aggregate processing for the node

  procedure UpdateAggregate; virtual;

  

Update aggregate calculations for the node

  class function IsAggregate; virtual;

  

Check if this node represents an aggregate operation

  function HasAggregate; virtual;

  

Check if node tree contains any aggregate operations

  function NodeType; virtual; abstract;

  

Get the result type of this expression node

  function NodeValue;

  

Get the evaluated value of this expression node

  function AsString; virtual; abstract;

  

Get string representation of the expression node

end;

Inheritance

TFPExprNode

  

Class for representing nodes in expression trees

|

TObject

Description

This is the abstract base class for all nodes in the expression tree. Every element of a parsed expression (literals, variables, operators, functions) is represented by a class derived from TFPExprNode.

The class defines the common interface that all expression nodes must implement, including evaluation, type checking, and aggregate processing. It provides the foundation for building complex expression trees through composition of different node types.

Derived classes implement specific functionality for different types of expression elements such as arithmetic operations, function calls, variable references, and literal values.


Documentation generated on: Dec 15 2025