THPDFContentSyntaxNodeKind Type
Classifies a node within the token-preserving content-stream syntax tree
Declaration
THPDFContentSyntaxNodeKind= (
csnkRoot,
csnkOperation,
csnkOperand,
csnkArray,
csnkDictionary,
csnkProcedure,
csnkInlineImage,
csnkMalformed
);
Unit
HPDFContentStream
Values
| Value | Purpose |
|---|---|
csnkRoot | Synthetic tree root parenting every top-level operation |
csnkOperation | One operator together with the operands that precede it |
csnkOperand | A single operand under an operation, array or dictionary |
csnkArray | Grouping node for a bracketed operand array, closed by the matching array-end lexeme |
csnkDictionary | Grouping node for an inline dictionary operand, closed by the matching dictionary-end lexeme |
csnkProcedure | Grouping node for the legacy procedure-set braces, nesting the operations inside |
csnkInlineImage | Inline image block spanning its BI dictionary, image data and EI terminator |
csnkMalformed | Byte range that broke the grammar, kept in the tree so that token-preserving edits never lose source bytes |
Usage notes
- The visitor walker only offers
csnkOperationandcsnkInlineImagenodes as operators; the grouping kinds give the tree its shape around them csnkMalformednodes carry a diagnostic message and remain editable as opaque spans instead of aborting the parse- Pair the kind with the lexeme span of the node to locate the exact source bytes of any subtree