Top Method Summary
Options Name Purpose
AddHiddenSegment (integer, integer, integer, integer, longchar) Appends a hidden segment (one hidden token) to a node Notes : Text longer than the CHARACTER limit is split over consecutive segments of the same type, so the concatenation of the segments is always the full hidden text @param piNodeId The node id @param piType The hidden token type @param piFile The file index the hidden token originates from @param piSrc The macro source number of the hidden token (0 = no expansion) @param plcText The hidden token text */
AppendNodeItem (integer, logical, longchar) Appends one node's hidden segments and its own text Notes : In source mode only items of the top-level file outside any macro expansion are written - plus the include / macro reference markers, which stand in for the referenced content. In fulltext mode the whitespace / comments of every file are written, directives and markers are dropped, and the node text appears expanded. @param piNodeId The node id @param plSourceMode TRUE = original source text, FALSE = preprocessed full text @param plcText The accumulator */
AppendPendingHidden (integer, integer, integer, longchar) Queues a hidden token pending attachment to the next node Notes : The statement and the expression parser both consume hidden tokens while scanning; queueing them here (rather than in per-parser state) guarantees that no hidden token is lost at the hand-over between the two parsers (SCL-5479) @param piType The hidden token type @param piFile The file index the hidden token originates from @param piSrc The macro source number of the hidden token (0 = no expansion) @param plcText The hidden token text */
AppendSubtree (integer, logical, longchar) Recursively appends a subtree's hidden text and node text in source order Notes : A node whose type is a binary operator and that has children is written infix - first child subtree, then the node itself, then the remaining child subtrees - because the expression parser nests the operands UNDER their operator, so plain pre-order would put the operator before its left operand (SCL-5479). All other nodes are written pre-order. @param piNodeId The node id to visit @param plSourceMode TRUE = original source text, FALSE = preprocessed full text @param plcText The accumulator */
Clear () Empties the store, discarding the whole tree Notes : */
CollectByType (integer, integer) Recursively collects the ids of nodes of a given type (pre-order) Notes : Appends matching node ids to ttQueryResult in visit order. @param piNodeId The node id to visit @param piTypeValue The node type value to match */
CHARACTER Comments (integer) Returns the comments (the comment segments of the leading hidden text) that precede a node Notes : @param piNodeId The node id @return The concatenated comment text */
INTEGER CopySubtree (NodeStore, integer, integer, integer) Copies a node with its whole subtree from another NodeStore Notes : Recursive worker for ImportChain (SCL-5461) @param poSource The NodeStore to copy from @param piSourceId The source node id @param piParentId The parent id in this store @param piOrder The child order in this store @return The id of the copied node */
INTEGER CreateDetachedNode (integer, character) Creates a detached synthetic node Notes : The node is created below its own detach group, so it has no parent and no siblings until a SetFirstChild / SetNextSibling call links it into the tree (SCL-5461) @param piType The node type (a NodeTypesEnum numeric value) @param pcText The node text @return The new node id */
INTEGER CreateNode (integer, integer, character) Creates a node with only the essential attributes Notes : Convenience overload; line, column and file index default to 0 and the node is a plain (subtype 1) natural node. @param piParentId The parent node id (0 for a root node) @param piType The node type (a NodeTypesEnum numeric value) @param pcText The node text @return The new node id */
INTEGER CreateNode (integer, integer, integer, character, integer, integer, integer) Creates a node and appends it as the last child of a parent Notes : Pure CREATE + assign. The append position is resolved with a single indexed find-last on (ParentId, ChildOrder); pass 0 as piParentId for a root node. @param piParentId The parent node id (0 for a root node) @param piType The node type (a NodeTypesEnum numeric value) @param piSubType The node subtype kind (a NodeSubTypesEnum numeric value, 1 = plain node) @param pcText The node text @param piLine The source line @param piColumn The source column @param piFileIndex The zero-based index into FileNames @return The new node id */
DetachChildren (integer, integer) Detaches children of a node into a fresh detach group Notes : The detached children keep their relative order (SCL-5461) @param piNodeId The node whose children to detach @param piBeforeOrder Only children with a ChildOrder below this value are detached; pass ? for all children */
DetachFollowingSiblings (integer) Detaches the siblings following a node into a fresh detach group Notes : The detached siblings keep their relative order, so the chain can be re-attached by a subsequent MoveChainToEnd (SCL-5461) @param piNodeId The node whose following siblings to detach */
LOGICAL Exists (integer) Returns whether a node id refers to a live node Notes : @param piNodeId The node id @return Logical value */
CHARACTER ExtractComments (character) Extracts the comment segments from a hidden-text string Notes : A comment segment runs from an opening slash-star to its matching closing star-slash. Nested comments are handled with a depth counter, matching the ABL comment-nesting rule. @param pcHidden The hidden text @return The concatenated comment segments (including delimiters) */
INTEGER FileIndexValue (integer) Returns the zero-based file index of a node Notes : @param piNodeId The node id @return The file index */
CHARACTER FileName (integer) Returns the file name of a node (from FileNames by FileIndex) Notes : @param piNodeId The node id @return The file name, or the empty string when out of range */
INTEGER FirstChildId (integer) Returns the id of the first child of a node Notes : @param piNodeId The node id @return The first child id, or 0 when there is none */
INTEGER FirstDirectChildId (integer, integer) Returns the id of the first direct child of a node with a type Notes : @param piNodeId The node id @param piTypeValue The node type value to match @return The matching child id, or 0 when there is none */
INTEGER FirstNaturalChildId (integer) Returns the id of the first natural child of a node Notes : Descends the firstChild chain until a natural node is found. @param piNodeId The node id @return The first natural child id, or 0 when there is none */
FlushPendingHidden (integer) Attaches all queued pending hidden tokens to a node Notes : The queue is drained in insertion order; nothing happens when the queue is empty @param piNodeId The node id */
GetHiddenSegment (integer, integer, integer, integer, integer, character) Returns one hidden segment of a node Notes : Used to copy the segments between stores (ImportChain) @param piNodeId The node id @param piSeq The 1-based segment sequence @param piType The hidden token type @param piFile The file index of the segment @param piSrc The macro source number of the segment @param pcText The segment text */
Consultingwerk.Studio.ProparseApi.INode GetNode (integer) Materializes the INode wrapper for a node id Notes : Lazy: a fresh, thin wrapper is created only for the requested node (as the .NET implementation also does on each navigation). The subtype kind selects the wrapper class. @param piNodeId The node id @return The INode wrapper, or the unknown value when the node does not exist */
INTEGER GetState2 (integer) Returns the STATE2 attribute (statement sub-type) of a node Notes : 0 when the node carries no state2 attribute (SCL-5532) @param piNodeId The node id @return The token type of the statement sub-type, or 0 for none */
INTEGER HiddenSegmentCount (integer) Returns the number of hidden segments attached to a node Notes : Used to copy the segments between stores (ImportChain) @param piNodeId The node id @return The segment count */
INTEGER ImportChain (NodeStore, integer) Copies a sibling chain (each node with its whole subtree) from another NodeStore into this store Notes : Used by InsertTextAfter (SCL-5461): the chain is imported below an isolated detach group and spliced into the tree with InsertChainAfter. Symbol / call / field-container links are not copied - they refer to the source store's symbol model @param poSource The NodeStore to copy from @param piHeadId The first node of the source sibling chain @return The id of the first imported node, or 0 */
InsertChainAfter (integer, integer) Splices a detached sibling chain into the tree behind a node Notes : The node's current following siblings are re-attached behind the spliced chain, as in the Java web app's insertTextAfter (SCL-5461) @param piNodeId The node behind which to splice the chain @param piHeadId The first node of the detached chain */
LOGICAL IsNatural (integer) Returns whether a node is natural (from real source text) Notes : @param piNodeId The node id @return Logical value */
LOGICAL IsStateHead (integer) Returns whether a node has the STATEHEAD attribute Notes : @param piNodeId The node id @return Logical value */
INTEGER LastChildId (integer) Returns the id of the last immediate child of a node Notes : @param piNodeId The node id @return The last child id, or 0 when there is none */
INTEGER LastDescendantId (integer) Returns the id of the last descendant of a node Notes : Repeats lastChild until there are no more children. @param piNodeId The node id @return The last descendant id (piNodeId itself when it has no children) */
CHARACTER LeadingHiddenText (integer) Returns the leading hidden text (whitespace / comments) of a node Notes : The concatenation of the node's hidden segments, truncated at the CHARACTER limit when the segments exceed it @param piNodeId The node id @return The leading hidden text */
INTEGER MacroSourceValue (integer) Returns the macro source number of a node Notes : @param piNodeId The node id @return The macro source number (0 = not from an expansion) */
MoveChainToEnd (integer, integer) Moves a node - together with the siblings following it at its current location - to the end of the child list of a new parent Notes : The moved chain keeps its relative order; the descendants of each moved node reference it by id and move with it implicitly (SCL-5461) @param piHeadId The first node of the chain to move @param piNewParentId The new parent node id */
INTEGER NextDetachGroup () Returns a fresh detach group parent id Notes : Negative and unique per detach operation (SCL-5461) @return The detach group parent id */
INTEGER NextNodeId (integer) Returns the id of the next node (first child, else next sibling) Notes : @param piNodeId The node id @return The next node id, or 0 when there is none */
INTEGER NextSiblingId (integer) Returns the id of the next sibling of a node Notes : @param piNodeId The node id @return The next sibling id, or 0 when there is none */
Consultingwerk.Studio.ProparseApi.IBufferScope NodeBufferScope (integer) Returns the buffer scope linked to a node, or the unknown value Notes : Materialized through the companion SymbolStore (SCL-5480). @param piNodeId The node id @return The IBufferScope, or the unknown value when there is none */
Consultingwerk.Studio.ProparseApi.ICall NodeCall (integer) Returns the call linked to a node, or the unknown value Notes : Materialized through the companion SymbolStore. @param piNodeId The node id @return The ICall, or the unknown value when there is none */
INTEGER NodeColumn (integer) Returns the node source column Notes : @param piNodeId The node id @return The source column */
Consultingwerk.Studio.ProparseApi.IFieldContainer NodeFieldContainer (integer) Returns the field container (frame) linked to a node, or the unknown value Notes : Materialized through the companion SymbolStore. @param piNodeId The node id @return The IFieldContainer, or the unknown value when there is none */
INTEGER NodeFieldContainerId (integer) Returns the frame symbol id linked to a node as its field container Notes : 0 when the node carries no field container (SCL-3077) @param piNodeId The node id @return The frame symbol id, or 0 */
INTEGER NodeLine (integer) Returns the node source line Notes : @param piNodeId The node id @return The source line */
CHARACTER NodeSourceTextValue (integer) Returns the verbatim source text of a node Notes : The empty string means "same as the node text" @param piNodeId The node id @return The verbatim source text */
Consultingwerk.Studio.ProparseApi.ISymbol NodeSymbol (integer) Returns the symbol linked to a node, or the unknown value Notes : Materialized through the companion SymbolStore. @param piNodeId The node id @return The ISymbol, or the unknown value when there is none */
INTEGER NodeSymbolId (integer) Returns the raw id of the symbol linked to a node, or 0 Notes : Used by the tree parser to read back a resolved reference (e.g. a RUN argument) without materializing the wrapper. @param piNodeId The node id @return The symbol id, or 0 when there is none */
CHARACTER NodeText (integer) Returns the node text Notes : @param piNodeId The node id @return The node text */
INTEGER NodeTypeValue (integer) Returns the node type value (NodeTypesEnum numeric value) Notes : @param piNodeId The node id @return The node type value, or 0 when the node does not exist */
INTEGER ParentNodeId (integer) Returns the id of the parent of a node Notes : @param piNodeId The node id @return The parent id, or 0 when there is none (root node) */
LOGICAL Position (integer) Positions the primary access buffer on a node Notes : One-slot position cache: a repeated request for the same node reuses the buffer without a find. @param piNodeId The node id @return Logical value indicating whether the node is available */
INTEGER PrevNodeId (integer) Returns the id of the previous node (prev sibling, else parent) Notes : @param piNodeId The node id @return The previous node id, or 0 when there is none */
INTEGER PrevSiblingId (integer) Returns the id of the previous sibling of a node Notes : @param piNodeId The node id @return The previous sibling id, or 0 when there is none */
Consultingwerk.Studio.ProparseApi.INode Query (integer, integer) Returns all nodes of a given type in the subtree rooted at a node Notes : Pre-order walk (the node itself is included when it matches). The matching ids are collected into a temp-table during the walk, so the walk itself is unbounded; only the final materialization into the INode EXTENT return value is subject to ABL's 32K variable segment (an object-reference array holds roughly 4000 elements before raising "Attempt to update data exceeding 32000." (12371) - see KB 000139961). This ceiling is inherent to the INode EXTENT Query contract and is shared by the .NET implementation; it is not a concern for realistic queries (a given node type occurs dozens to hundreds of times per compile unit). @param piNodeId The node id whose subtree is searched @param piTypeValue The node type value to match @return The array of matching INode instances (indeterminate when none) */
Reparent (integer, integer) Moves a node (with its whole subtree) to become the last child of a new parent Notes : Build-time helper for constructing operator-precedence expression trees bottom-up: a left operand created earlier is re-parented under the operator node discovered afterwards. Only the moved node's ParentId / ChildOrder change; its descendants reference it by id and move with it implicitly. The append position is resolved with a single indexed find-last on (ParentId, ChildOrder), as in CreateNode. @param piNodeId The node to move @param piNewParentId The new parent node id */
ResolveWriterTypes () Resolves the node type numbers the source writer dispatches on Notes : Lazy, resolved once per store. The operator list holds the binary operator node types that own their left operand as their first child - the writer emits these infix (first child, operator, remaining children), which restores source order for the operator-rooted expression shape (SCL-5479). */
SetFirstChild (integer, integer) Sets the first child of a node Notes : Emulates the JPNode setFirstChild / setDown semantics on the record model (SCL-5461): passing 0 detaches all children; passing a current child of the node detaches the children preceding it; passing any other node detaches all current children and moves the given node - together with the siblings following it at its current location - below the node. Detached chains keep their relative order in an isolated detach group, so the temp-table tree stays intact @param piNodeId The node whose first child to set @param piChildId The node id of the new first child (0 to remove the children) */
SetLeadingHiddenText (integer, character) Attaches leading hidden text (whitespace / comments) to a node Notes : Replaces any hidden segments the node already carries with a single plain-text segment attributed to the top-level file @param piNodeId The node id @param pcHiddenText The leading hidden text */
SetMacroSource (integer, integer) Sets the macro source number of a node Notes : A node created from a macro-expanded token records the source number of the expansion, so the source writer can suppress the expanded text in favour of the original reference (SCL-5479) @param piNodeId The node id @param piMacroSourceNum The macro source number (0 = not from an expansion) */
SetNextSibling (integer, integer) Sets the next sibling of a node Notes : Emulates the JPNode setNextSibling semantics on the record model (SCL-5461): the node's current following siblings are detached (as an intact chain in an isolated detach group); when a sibling id is passed, that node - together with the siblings following it at its current location (which may be the chain just detached) - is moved behind the node. Passing 0 truncates the sibling list @param piNodeId The node whose next sibling to set @param piSiblingId The node id of the new next sibling (0 to truncate the sibling list) */
SetNodeBufferScope (integer, integer) Links a buffer scope (in the companion SymbolStore) to a node Notes : Set by the tree parser on a RECORD_NAME node and on the Field_ref of a resolved buffer-field reference (SCL-5480). @param piNodeId The node id @param piBufferScopeId The buffer-scope id (0 to clear) */
SetNodeCall (integer, integer) Links a call (in the companion SymbolStore) to a node Notes : @param piNodeId The node id @param piCallId The call id (0 to clear) */
SetNodeFieldContainer (integer, integer) Links a field container (a frame symbol in the companion SymbolStore) to a node Notes : @param piNodeId The node id @param piFrameSymbolId The frame symbol id (0 to clear) */
SetNodeSourceText (integer, character) Sets the verbatim source text of a node when it differs from its (expanded) node text Notes : Set for a token whose scan crossed a macro expansion (a quoted string holding a macro reference); the source writer emits it in place of the node text (SCL-5479) @param piNodeId The node id @param pcSourceText The verbatim source text */
SetNodeSymbol (integer, integer) Links a symbol (in the companion SymbolStore) to a node Notes : @param piNodeId The node id @param piSymbolId The symbol id (0 to clear) */
SetNodeText (integer, character) Sets the node text Notes : @param piNodeId The node id @param pcText The new node text */
SetNodeType (integer, integer) Changes the node type of an existing node Notes : Used by the statement parser when the shape of a construct is only known after part of it has been parsed (e.g. an ID-headed statement is a synthetic ASSIGN until the missing "=" reveals an Expr_statement). @param piNodeId The node id @param piNodeType The new node type number */
SetPrevSibling (integer, integer) Sets the previous sibling of a node Notes : Emulates the JPNode setPrevSibling semantics on the record model (SCL-5461): when the given node already is the immediate previous sibling, the call is a no-op (the back-pointer sync usage); otherwise the given node - together with the siblings following it at its current location - is moved immediately before the node. Passing 0 detaches the preceding siblings @param piNodeId The node whose previous sibling to set @param piPrevId The node id of the new previous sibling (0 to detach the preceding siblings) */
SetState2 (integer, integer) Sets the STATE2 attribute (statement sub-type) of a node Notes : Pass 0 to clear the attribute - the reference engine reports 0 for a statement head without a sub-type (SCL-5532) @param piNodeId The node id @param piState2 The token type of the statement sub-type, or 0 for none */
SetStateHead (integer, logical) Sets or clears the STATEHEAD attribute of a node Notes : @param piNodeId The node id @param plStateHead The new state-head flag */
SetSynthetic (integer) Marks a node as synthetic (not from real source text) Notes : Natural defaults to TRUE on CreateNode; call this to flag a node added only for tree structure. @param piNodeId The node id */
Consultingwerk.Studio.ProparseApi.NodeTypesEnum State2Enum (integer) Returns the STATE2 attribute of a node as a NodeTypesEnum Notes : ? when the node carries no state2 attribute, mirroring how TypeEnum reports a value that is not an enum member (SCL-5532) @param piNodeId The node id @return The statement sub-type as a NodeTypesEnum, or ? */
INTEGER StatementId (integer) Returns the id of the statement head enclosing a node Notes : Returns the node itself when it is a state-head, otherwise climbs the parent chain to the first enclosing state-head. @param piNodeId The node id @return The statement head id, or 0 when there is none */
LONGCHAR SubtreeFulltext (integer) Returns the full, preprocessed text of a subtree Notes : Nodes and hidden segments are written in source order (operator nodes infix); include content and macro expansions appear expanded, preprocessor directives and the reference markers are dropped. Backs INode:ToStringFulltext (SCL-5479). @param piNodeId The node id whose subtree is rendered @return The preprocessed text */
LONGCHAR SubtreeSourceText (integer) Returns the original source text of a subtree Notes : Reproduces the top-level source byte for byte: nodes and hidden segments are written in source order (operator nodes infix, see AppendSubtree), text from include files or macro expansions is skipped and the include / macro reference markers are written in their place. Backs INode:ToStringSourceText (SCL-5479). @param piNodeId The node id whose subtree is rendered @return The source text */
Consultingwerk.Studio.ProparseApi.NodeSubTypesEnum SubTypeEnum (integer) Returns the node subtype kind as a NodeSubTypesEnum Notes : @param piNodeId The node id @return The NodeSubTypesEnum, or the unknown value when it cannot be resolved */
INTEGER SubTypeValue (integer) Returns the node subtype kind value (1..6) Notes : @param piNodeId The node id @return The subtype kind, or 0 when the node does not exist */
Consultingwerk.Studio.ProparseApi.NodeTypesEnum TypeEnum (integer) Returns the node type as a NodeTypesEnum Notes : @param piNodeId The node id @return The NodeTypesEnum, or the unknown value when it cannot be resolved */

Top Constructor Summary
Options Name Purpose
NodeStore () Constructor for the NodeStore class Notes : */

Top Property Summary
Options Name Purpose
CHARACTER FileNames
INTEGER NodeCount
Consultingwerk.Studio.ProparseApi.Implementation.ProparseAbl.TreeParser.SymbolStore Symbols


Method Detail
Top

AddHiddenSegment (integer, integer, integer, integer, longchar)

Purpose: Appends a hidden segment (one hidden token) to a node
Notes : Text longer than the CHARACTER limit is split over consecutive
segments of the same type, so the concatenation of the segments
is always the full hidden text

Parameters:
piNodeId INTEGER
The node id
piType INTEGER
The hidden token type
piFile INTEGER
The file index the hidden token originates from
piSrc INTEGER
The macro source number of the hidden token (0 = no expansion)
plcText LONGCHAR
The hidden token text
Top

AppendNodeItem (integer, logical, longchar)

Purpose: Appends one node's hidden segments and its own text
Notes : In source mode only items of the top-level file outside any
macro expansion are written - plus the include / macro
reference markers, which stand in for the referenced content.
In fulltext mode the whitespace / comments of every file are
written, directives and markers are dropped, and the node text
appears expanded.

Parameters:
piNodeId INTEGER
The node id
plSourceMode LOGICAL
TRUE = original source text, FALSE = preprocessed full text
plcText LONGCHAR
The accumulator
Top

AppendPendingHidden (integer, integer, integer, longchar)

Purpose: Queues a hidden token pending attachment to the next node
Notes : The statement and the expression parser both consume hidden
tokens while scanning; queueing them here (rather than in
per-parser state) guarantees that no hidden token is lost at
the hand-over between the two parsers (SCL-5479)

Parameters:
piType INTEGER
The hidden token type
piFile INTEGER
The file index the hidden token originates from
piSrc INTEGER
The macro source number of the hidden token (0 = no expansion)
plcText LONGCHAR
The hidden token text
Top

AppendSubtree (integer, logical, longchar)

Purpose: Recursively appends a subtree's hidden text and node text in
source order
Notes : A node whose type is a binary operator and that has children is
written infix - first child subtree, then the node itself, then
the remaining child subtrees - because the expression parser
nests the operands UNDER their operator, so plain pre-order
would put the operator before its left operand (SCL-5479). All
other nodes are written pre-order.

Parameters:
piNodeId INTEGER
The node id to visit
plSourceMode LOGICAL
TRUE = original source text, FALSE = preprocessed full text
plcText LONGCHAR
The accumulator
Top

Clear ()

Purpose: Empties the store, discarding the whole tree
Notes :

Top

CollectByType (integer, integer)

Purpose: Recursively collects the ids of nodes of a given type (pre-order)
Notes : Appends matching node ids to ttQueryResult in visit order.

Parameters:
piNodeId INTEGER
The node id to visit
piTypeValue INTEGER
The node type value to match
Top

CHARACTER Comments (integer)

Purpose: Returns the comments (the comment segments of the leading hidden
text) that precede a node
Notes :

Parameters:
piNodeId INTEGER
The node id
Returns CHARACTER
The concatenated comment text
Top

INTEGER CopySubtree (NodeStore, integer, integer, integer)

Purpose: Copies a node with its whole subtree from another NodeStore
Notes : Recursive worker for ImportChain (SCL-5461)

Parameters:
poSource Consultingwerk.Studio.ProparseApi.Implementation.ProparseAbl.Nodes.NodeStore
The NodeStore to copy from
piSourceId INTEGER
The source node id
piParentId INTEGER
The parent id in this store
piOrder INTEGER
The child order in this store
Returns INTEGER
The id of the copied node
Top

INTEGER CreateDetachedNode (integer, character)

Purpose: Creates a detached synthetic node
Notes : The node is created below its own detach group, so it has no
parent and no siblings until a SetFirstChild / SetNextSibling
call links it into the tree (SCL-5461)

Parameters:
piType INTEGER
The node type (a NodeTypesEnum numeric value)
pcText CHARACTER
The node text
Returns INTEGER
The new node id
Top

INTEGER CreateNode (integer, integer, character)

Purpose: Creates a node with only the essential attributes
Notes : Convenience overload; line, column and file index default to 0
and the node is a plain (subtype 1) natural node.

Parameters:
piParentId INTEGER
The parent node id (0 for a root node)
piType INTEGER
The node type (a NodeTypesEnum numeric value)
pcText CHARACTER
The node text
Returns INTEGER
The new node id
Top

INTEGER CreateNode (integer, integer, integer, character, integer, integer, integer)

Purpose: Creates a node and appends it as the last child of a parent
Notes : Pure CREATE + assign. The append position is resolved with a
single indexed find-last on (ParentId, ChildOrder); pass 0 as
piParentId for a root node.

Parameters:
piParentId INTEGER
The parent node id (0 for a root node)
piType INTEGER
The node type (a NodeTypesEnum numeric value)
piSubType INTEGER
The node subtype kind (a NodeSubTypesEnum numeric value, 1 = plain node)
pcText CHARACTER
The node text
piLine INTEGER
The source line
piColumn INTEGER
The source column
piFileIndex INTEGER
The zero-based index into FileNames
Returns INTEGER
The new node id
Top

DetachChildren (integer, integer)

Purpose: Detaches children of a node into a fresh detach group
Notes : The detached children keep their relative order (SCL-5461)

Parameters:
piNodeId INTEGER
The node whose children to detach
piBeforeOrder INTEGER
Only children with a ChildOrder below this value are detached; pass ? for all children
Top

DetachFollowingSiblings (integer)

Purpose: Detaches the siblings following a node into a fresh detach group
Notes : The detached siblings keep their relative order, so the chain
can be re-attached by a subsequent MoveChainToEnd (SCL-5461)

Parameters:
piNodeId INTEGER
The node whose following siblings to detach
Top

LOGICAL Exists (integer)

Purpose: Returns whether a node id refers to a live node
Notes :

Parameters:
piNodeId INTEGER
The node id
Returns LOGICAL
Logical value
Top

CHARACTER ExtractComments (character)

Purpose: Extracts the comment segments from a hidden-text string
Notes : A comment segment runs from an opening slash-star to its matching
closing star-slash. Nested comments are handled with a depth
counter, matching the ABL comment-nesting rule.

Parameters:
pcHidden CHARACTER
The hidden text
Returns CHARACTER
The concatenated comment segments (including delimiters)
Top

INTEGER FileIndexValue (integer)

Purpose: Returns the zero-based file index of a node
Notes :

Parameters:
piNodeId INTEGER
The node id
Returns INTEGER
The file index
Top

CHARACTER FileName (integer)

Purpose: Returns the file name of a node (from FileNames by FileIndex)
Notes :

Parameters:
piNodeId INTEGER
The node id
Returns CHARACTER
The file name, or the empty string when out of range
Top

INTEGER FirstChildId (integer)

Purpose: Returns the id of the first child of a node
Notes :

Parameters:
piNodeId INTEGER
The node id
Returns INTEGER
The first child id, or 0 when there is none
Top

INTEGER FirstDirectChildId (integer, integer)

Purpose: Returns the id of the first direct child of a node with a type
Notes :

Parameters:
piNodeId INTEGER
The node id
piTypeValue INTEGER
The node type value to match
Returns INTEGER
The matching child id, or 0 when there is none
Top

INTEGER FirstNaturalChildId (integer)

Purpose: Returns the id of the first natural child of a node
Notes : Descends the firstChild chain until a natural node is found.

Parameters:
piNodeId INTEGER
The node id
Returns INTEGER
The first natural child id, or 0 when there is none
Top

FlushPendingHidden (integer)

Purpose: Attaches all queued pending hidden tokens to a node
Notes : The queue is drained in insertion order; nothing happens when
the queue is empty

Parameters:
piNodeId INTEGER
The node id
Top

GetHiddenSegment (integer, integer, integer, integer, integer, character)

Purpose: Returns one hidden segment of a node
Notes : Used to copy the segments between stores (ImportChain)

Parameters:
piNodeId INTEGER
The node id
piSeq INTEGER
The 1-based segment sequence
piType INTEGER
The hidden token type
piFile INTEGER
The file index of the segment
piSrc INTEGER
The macro source number of the segment
pcText CHARACTER
The segment text
Top

Consultingwerk.Studio.ProparseApi.INode GetNode (integer)

Purpose: Materializes the INode wrapper for a node id
Notes : Lazy: a fresh, thin wrapper is created only for the requested
node (as the .NET implementation also does on each navigation).
The subtype kind selects the wrapper class.

Parameters:
piNodeId INTEGER
The node id
Returns Consultingwerk.Studio.ProparseApi.INode
The INode wrapper, or the unknown value when the node does not exist
Top

INTEGER GetState2 (integer)

Purpose: Returns the STATE2 attribute (statement sub-type) of a node
Notes : 0 when the node carries no state2 attribute (SCL-5532)

Parameters:
piNodeId INTEGER
The node id
Returns INTEGER
The token type of the statement sub-type, or 0 for none
Top

INTEGER HiddenSegmentCount (integer)

Purpose: Returns the number of hidden segments attached to a node
Notes : Used to copy the segments between stores (ImportChain)

Parameters:
piNodeId INTEGER
The node id
Returns INTEGER
The segment count
Top

INTEGER ImportChain (NodeStore, integer)

Purpose: Copies a sibling chain (each node with its whole subtree) from
another NodeStore into this store
Notes : Used by InsertTextAfter (SCL-5461): the chain is imported below
an isolated detach group and spliced into the tree with
InsertChainAfter. Symbol / call / field-container links are not
copied - they refer to the source store's symbol model

Parameters:
poSource Consultingwerk.Studio.ProparseApi.Implementation.ProparseAbl.Nodes.NodeStore
The NodeStore to copy from
piHeadId INTEGER
The first node of the source sibling chain
Returns INTEGER
The id of the first imported node, or 0
Top

InsertChainAfter (integer, integer)

Purpose: Splices a detached sibling chain into the tree behind a node
Notes : The node's current following siblings are re-attached behind
the spliced chain, as in the Java web app's insertTextAfter
(SCL-5461)

Parameters:
piNodeId INTEGER
The node behind which to splice the chain
piHeadId INTEGER
The first node of the detached chain
Top

LOGICAL IsNatural (integer)

Purpose: Returns whether a node is natural (from real source text)
Notes :

Parameters:
piNodeId INTEGER
The node id
Returns LOGICAL
Logical value
Top

LOGICAL IsStateHead (integer)

Purpose: Returns whether a node has the STATEHEAD attribute
Notes :

Parameters:
piNodeId INTEGER
The node id
Returns LOGICAL
Logical value
Top

INTEGER LastChildId (integer)

Purpose: Returns the id of the last immediate child of a node
Notes :

Parameters:
piNodeId INTEGER
The node id
Returns INTEGER
The last child id, or 0 when there is none
Top

INTEGER LastDescendantId (integer)

Purpose: Returns the id of the last descendant of a node
Notes : Repeats lastChild until there are no more children.

Parameters:
piNodeId INTEGER
The node id
Returns INTEGER
The last descendant id (piNodeId itself when it has no children)
Top

CHARACTER LeadingHiddenText (integer)

Purpose: Returns the leading hidden text (whitespace / comments) of a node
Notes : The concatenation of the node's hidden segments, truncated at
the CHARACTER limit when the segments exceed it

Parameters:
piNodeId INTEGER
The node id
Returns CHARACTER
The leading hidden text
Top

INTEGER MacroSourceValue (integer)

Purpose: Returns the macro source number of a node
Notes :

Parameters:
piNodeId INTEGER
The node id
Returns INTEGER
The macro source number (0 = not from an expansion)
Top

MoveChainToEnd (integer, integer)

Purpose: Moves a node - together with the siblings following it at its
current location - to the end of the child list of a new parent
Notes : The moved chain keeps its relative order; the descendants of
each moved node reference it by id and move with it implicitly
(SCL-5461)

Parameters:
piHeadId INTEGER
The first node of the chain to move
piNewParentId INTEGER
The new parent node id
Top

INTEGER NextDetachGroup ()

Purpose: Returns a fresh detach group parent id
Notes : Negative and unique per detach operation (SCL-5461)

Returns INTEGER
The detach group parent id
Top

INTEGER NextNodeId (integer)

Purpose: Returns the id of the next node (first child, else next sibling)
Notes :

Parameters:
piNodeId INTEGER
The node id
Returns INTEGER
The next node id, or 0 when there is none
Top

INTEGER NextSiblingId (integer)

Purpose: Returns the id of the next sibling of a node
Notes :

Parameters:
piNodeId INTEGER
The node id
Returns INTEGER
The next sibling id, or 0 when there is none
Top

Consultingwerk.Studio.ProparseApi.IBufferScope NodeBufferScope (integer)

Purpose: Returns the buffer scope linked to a node, or the unknown value
Notes : Materialized through the companion SymbolStore (SCL-5480).

Parameters:
piNodeId INTEGER
The node id
Returns Consultingwerk.Studio.ProparseApi.IBufferScope
The IBufferScope, or the unknown value when there is none
Top

Consultingwerk.Studio.ProparseApi.ICall NodeCall (integer)

Purpose: Returns the call linked to a node, or the unknown value
Notes : Materialized through the companion SymbolStore.

Parameters:
piNodeId INTEGER
The node id
Returns Consultingwerk.Studio.ProparseApi.ICall
The ICall, or the unknown value when there is none
Top

INTEGER NodeColumn (integer)

Purpose: Returns the node source column
Notes :

Parameters:
piNodeId INTEGER
The node id
Returns INTEGER
The source column
Top

Consultingwerk.Studio.ProparseApi.IFieldContainer NodeFieldContainer (integer)

Purpose: Returns the field container (frame) linked to a node, or the
unknown value
Notes : Materialized through the companion SymbolStore.

Parameters:
piNodeId INTEGER
The node id
Returns Consultingwerk.Studio.ProparseApi.IFieldContainer
The IFieldContainer, or the unknown value when there is none
Top

INTEGER NodeFieldContainerId (integer)

Purpose: Returns the frame symbol id linked to a node as its field
container
Notes : 0 when the node carries no field container (SCL-3077)

Parameters:
piNodeId INTEGER
The node id
Returns INTEGER
The frame symbol id, or 0
Top

INTEGER NodeLine (integer)

Purpose: Returns the node source line
Notes :

Parameters:
piNodeId INTEGER
The node id
Returns INTEGER
The source line
Top

CHARACTER NodeSourceTextValue (integer)

Purpose: Returns the verbatim source text of a node
Notes : The empty string means "same as the node text"

Parameters:
piNodeId INTEGER
The node id
Returns CHARACTER
The verbatim source text
Top

Consultingwerk.Studio.ProparseApi.ISymbol NodeSymbol (integer)

Purpose: Returns the symbol linked to a node, or the unknown value
Notes : Materialized through the companion SymbolStore.

Parameters:
piNodeId INTEGER
The node id
Returns Consultingwerk.Studio.ProparseApi.ISymbol
The ISymbol, or the unknown value when there is none
Top

INTEGER NodeSymbolId (integer)

Purpose: Returns the raw id of the symbol linked to a node, or 0
Notes : Used by the tree parser to read back a resolved reference
(e.g. a RUN argument) without materializing the wrapper.

Parameters:
piNodeId INTEGER
The node id
Returns INTEGER
The symbol id, or 0 when there is none
Top

CHARACTER NodeText (integer)

Purpose: Returns the node text
Notes :

Parameters:
piNodeId INTEGER
The node id
Returns CHARACTER
The node text
Top

INTEGER NodeTypeValue (integer)

Purpose: Returns the node type value (NodeTypesEnum numeric value)
Notes :

Parameters:
piNodeId INTEGER
The node id
Returns INTEGER
The node type value, or 0 when the node does not exist
Top

INTEGER ParentNodeId (integer)

Purpose: Returns the id of the parent of a node
Notes :

Parameters:
piNodeId INTEGER
The node id
Returns INTEGER
The parent id, or 0 when there is none (root node)
Top

LOGICAL Position (integer)

Purpose: Positions the primary access buffer on a node
Notes : One-slot position cache: a repeated request for the same node
reuses the buffer without a find.

Parameters:
piNodeId INTEGER
The node id
Returns LOGICAL
Logical value indicating whether the node is available
Top

INTEGER PrevNodeId (integer)

Purpose: Returns the id of the previous node (prev sibling, else parent)
Notes :

Parameters:
piNodeId INTEGER
The node id
Returns INTEGER
The previous node id, or 0 when there is none
Top

INTEGER PrevSiblingId (integer)

Purpose: Returns the id of the previous sibling of a node
Notes :

Parameters:
piNodeId INTEGER
The node id
Returns INTEGER
The previous sibling id, or 0 when there is none
Top

Consultingwerk.Studio.ProparseApi.INode Query (integer, integer)

Purpose: Returns all nodes of a given type in the subtree rooted at a node
Notes : Pre-order walk (the node itself is included when it matches). The
matching ids are collected into a temp-table during the walk, so
the walk itself is unbounded; only the final materialization into
the INode EXTENT return value is subject to ABL's 32K variable
segment (an object-reference array holds roughly 4000 elements
before raising "Attempt to update data exceeding 32000." (12371)
- see KB 000139961). This ceiling is inherent to the INode EXTENT
Query contract and is shared by the .NET implementation; it is not
a concern for realistic queries (a given node type occurs dozens
to hundreds of times per compile unit).

Parameters:
piNodeId INTEGER
The node id whose subtree is searched
piTypeValue INTEGER
The node type value to match
Returns Consultingwerk.Studio.ProparseApi.INode
The array of matching INode instances (indeterminate when none)
Top

Reparent (integer, integer)

Purpose: Moves a node (with its whole subtree) to become the last child
of a new parent
Notes : Build-time helper for constructing operator-precedence
expression trees bottom-up: a left operand created earlier is
re-parented under the operator node discovered afterwards. Only
the moved node's ParentId / ChildOrder change; its descendants
reference it by id and move with it implicitly. The append
position is resolved with a single indexed find-last on
(ParentId, ChildOrder), as in CreateNode.

Parameters:
piNodeId INTEGER
The node to move
piNewParentId INTEGER
The new parent node id
Top

ResolveWriterTypes ()

Purpose: Resolves the node type numbers the source writer dispatches on
Notes : Lazy, resolved once per store. The operator list holds the
binary operator node types that own their left operand as their
first child - the writer emits these infix (first child,
operator, remaining children), which restores source order for
the operator-rooted expression shape (SCL-5479).

Top

SetFirstChild (integer, integer)

Purpose: Sets the first child of a node
Notes : Emulates the JPNode setFirstChild / setDown semantics on the
record model (SCL-5461): passing 0 detaches all children;
passing a current child of the node detaches the children
preceding it; passing any other node detaches all current
children and moves the given node - together with the siblings
following it at its current location - below the node. Detached
chains keep their relative order in an isolated detach group,
so the temp-table tree stays intact

Parameters:
piNodeId INTEGER
The node whose first child to set
piChildId INTEGER
The node id of the new first child (0 to remove the children)
Top

SetLeadingHiddenText (integer, character)

Purpose: Attaches leading hidden text (whitespace / comments) to a node
Notes : Replaces any hidden segments the node already carries with a
single plain-text segment attributed to the top-level file

Parameters:
piNodeId INTEGER
The node id
pcHiddenText CHARACTER
The leading hidden text
Top

SetMacroSource (integer, integer)

Purpose: Sets the macro source number of a node
Notes : A node created from a macro-expanded token records the source
number of the expansion, so the source writer can suppress the
expanded text in favour of the original reference (SCL-5479)

Parameters:
piNodeId INTEGER
The node id
piMacroSourceNum INTEGER
The macro source number (0 = not from an expansion)
Top

SetNextSibling (integer, integer)

Purpose: Sets the next sibling of a node
Notes : Emulates the JPNode setNextSibling semantics on the record model
(SCL-5461): the node's current following siblings are detached
(as an intact chain in an isolated detach group); when a sibling
id is passed, that node - together with the siblings following
it at its current location (which may be the chain just
detached) - is moved behind the node. Passing 0 truncates the
sibling list

Parameters:
piNodeId INTEGER
The node whose next sibling to set
piSiblingId INTEGER
The node id of the new next sibling (0 to truncate the sibling list)
Top

SetNodeBufferScope (integer, integer)

Purpose: Links a buffer scope (in the companion SymbolStore) to a node
Notes : Set by the tree parser on a RECORD_NAME node and on the Field_ref
of a resolved buffer-field reference (SCL-5480).

Parameters:
piNodeId INTEGER
The node id
piBufferScopeId INTEGER
The buffer-scope id (0 to clear)
Top

SetNodeCall (integer, integer)

Purpose: Links a call (in the companion SymbolStore) to a node
Notes :

Parameters:
piNodeId INTEGER
The node id
piCallId INTEGER
The call id (0 to clear)
Top

SetNodeFieldContainer (integer, integer)

Purpose: Links a field container (a frame symbol in the companion
SymbolStore) to a node
Notes :

Parameters:
piNodeId INTEGER
The node id
piFrameSymbolId INTEGER
The frame symbol id (0 to clear)
Top

SetNodeSourceText (integer, character)

Purpose: Sets the verbatim source text of a node when it differs from
its (expanded) node text
Notes : Set for a token whose scan crossed a macro expansion (a quoted
string holding a macro reference); the source writer emits it
in place of the node text (SCL-5479)

Parameters:
piNodeId INTEGER
The node id
pcSourceText CHARACTER
The verbatim source text
Top

SetNodeSymbol (integer, integer)

Purpose: Links a symbol (in the companion SymbolStore) to a node
Notes :

Parameters:
piNodeId INTEGER
The node id
piSymbolId INTEGER
The symbol id (0 to clear)
Top

SetNodeText (integer, character)

Purpose: Sets the node text
Notes :

Parameters:
piNodeId INTEGER
The node id
pcText CHARACTER
The new node text
Top

SetNodeType (integer, integer)

Purpose: Changes the node type of an existing node
Notes : Used by the statement parser when the shape of a construct is
only known after part of it has been parsed (e.g. an ID-headed
statement is a synthetic ASSIGN until the missing "=" reveals an
Expr_statement).

Parameters:
piNodeId INTEGER
The node id
piNodeType INTEGER
The new node type number
Top

SetPrevSibling (integer, integer)

Purpose: Sets the previous sibling of a node
Notes : Emulates the JPNode setPrevSibling semantics on the record model
(SCL-5461): when the given node already is the immediate
previous sibling, the call is a no-op (the back-pointer sync
usage); otherwise the given node - together with the siblings
following it at its current location - is moved immediately
before the node. Passing 0 detaches the preceding siblings

Parameters:
piNodeId INTEGER
The node whose previous sibling to set
piPrevId INTEGER
The node id of the new previous sibling (0 to detach the preceding siblings)
Top

SetState2 (integer, integer)

Purpose: Sets the STATE2 attribute (statement sub-type) of a node
Notes : Pass 0 to clear the attribute - the reference engine reports 0
for a statement head without a sub-type (SCL-5532)

Parameters:
piNodeId INTEGER
The node id
piState2 INTEGER
The token type of the statement sub-type, or 0 for none
Top

SetStateHead (integer, logical)

Purpose: Sets or clears the STATEHEAD attribute of a node
Notes :

Parameters:
piNodeId INTEGER
The node id
plStateHead LOGICAL
The new state-head flag
Top

SetSynthetic (integer)

Purpose: Marks a node as synthetic (not from real source text)
Notes : Natural defaults to TRUE on CreateNode; call this to flag a node
added only for tree structure.

Parameters:
piNodeId INTEGER
The node id
Top

Consultingwerk.Studio.ProparseApi.NodeTypesEnum State2Enum (integer)

Purpose: Returns the STATE2 attribute of a node as a NodeTypesEnum
Notes : ? when the node carries no state2 attribute, mirroring how
TypeEnum reports a value that is not an enum member (SCL-5532)

Parameters:
piNodeId INTEGER
The node id
Returns Consultingwerk.Studio.ProparseApi.NodeTypesEnum
The statement sub-type as a NodeTypesEnum, or ?
Top

INTEGER StatementId (integer)

Purpose: Returns the id of the statement head enclosing a node
Notes : Returns the node itself when it is a state-head, otherwise climbs
the parent chain to the first enclosing state-head.

Parameters:
piNodeId INTEGER
The node id
Returns INTEGER
The statement head id, or 0 when there is none
Top

LONGCHAR SubtreeFulltext (integer)

Purpose: Returns the full, preprocessed text of a subtree
Notes : Nodes and hidden segments are written in source order (operator
nodes infix); include content and macro expansions appear
expanded, preprocessor directives and the reference markers are
dropped. Backs INode:ToStringFulltext (SCL-5479).

Parameters:
piNodeId INTEGER
The node id whose subtree is rendered
Returns LONGCHAR
The preprocessed text
Top

LONGCHAR SubtreeSourceText (integer)

Purpose: Returns the original source text of a subtree
Notes : Reproduces the top-level source byte for byte: nodes and hidden
segments are written in source order (operator nodes infix, see
AppendSubtree), text from include files or macro expansions is
skipped and the include / macro reference markers are written in
their place. Backs INode:ToStringSourceText (SCL-5479).

Parameters:
piNodeId INTEGER
The node id whose subtree is rendered
Returns LONGCHAR
The source text
Top

Consultingwerk.Studio.ProparseApi.NodeSubTypesEnum SubTypeEnum (integer)

Purpose: Returns the node subtype kind as a NodeSubTypesEnum
Notes :

Parameters:
piNodeId INTEGER
The node id
Returns Consultingwerk.Studio.ProparseApi.NodeSubTypesEnum
The NodeSubTypesEnum, or the unknown value when it cannot be resolved
Top

INTEGER SubTypeValue (integer)

Purpose: Returns the node subtype kind value (1..6)
Notes :

Parameters:
piNodeId INTEGER
The node id
Returns INTEGER
The subtype kind, or 0 when the node does not exist
Top

Consultingwerk.Studio.ProparseApi.NodeTypesEnum TypeEnum (integer)

Purpose: Returns the node type as a NodeTypesEnum
Notes :

Parameters:
piNodeId INTEGER
The node id
Returns Consultingwerk.Studio.ProparseApi.NodeTypesEnum
The NodeTypesEnum, or the unknown value when it cannot be resolved


Constructor Detail
Top

NodeStore ()

Purpose: Constructor for the NodeStore class
Notes :



Property Detail
Top

CHARACTER FileNames


Returns CHARACTER
Top

INTEGER NodeCount


Returns INTEGER
Top

Consultingwerk.Studio.ProparseApi.Implementation.ProparseAbl.TreeParser.SymbolStore Symbols


Returns Consultingwerk.Studio.ProparseApi.Implementation.ProparseAbl.TreeParser.SymbolStore


©2006-2026 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       19.09.2026 10:18:19