|
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
*/
|