structuralOffset property
RuneOffset?
get
structuralOffset
Actual start offset when the current node is part of a node that allows arbitrary use of YAML indicators to demarcate it structure. For the parser, this is the node's first parsable content.
This should not be confused with nodeStart and nodeEnd offsets which
accurately describe the node's own structure independent of surrounding
nodes. This will always be null for a top-level:
- Flow collection, quoted scalar and block scalar since their indicators are part of the node's structure.
- Block collection and plain scalar.
For a block sequence entry, this represents the offset of the -
indicator.
- "hello"
- 'world'
- block: map
- {flow: map}
- [flow, sequence]
In a block/flow map, this represents the offset of the ? indicator when
the node is an explicit key and : when the node is a value to an
explicit/implicit key. For implicit keys, this will always be null.
- ? explicit
: entry
implicit: entry
- {? this, : is, valid: }
- [this: compact, ? notation, ? is : acceptable]
Implementation
RuneOffset? get structuralOffset;