Sign in Join
FPDoc Onlineexperiment

TFPExprNode class

In unit fpExprPars

Class for representing nodes in expression trees

Declaration

pascal
TFPExprNode = class(TObject)

Inheritance

  1. TFPExprNode
  2. TObject

Descends from it: TCaseOperation TFPBinaryOperation TFPConstExpression TFPExprIdentifierNode TFPUnaryOperator

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.

Methods

CheckNodeTypeprotected
GetNodeValueprotected
CheckpublicValidate the expression node for correctness
InitAggregatepublicInitialize aggregate processing for the node
UpdateAggregatepublicUpdate aggregate calculations for the node
IsAggregatepublicCheck if this node represents an aggregate operation
HasAggregatepublicCheck if node tree contains any aggregate operations
NodeTypepublicGet the result type of this expression node
NodeValuepublicGet the evaluated value of this expression node
AsStringpublicGet string representation of the expression node

Inherited

From TObject (42)

AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance Create DefaultHandler DefaultHandlerStr Destroy Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName SafeCallException StringMessageTable SystemHasExtendedRTTI ToString UnitName

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.