SourceMapper class
AST Source Position Navigation Utility
Provides bidirectional mapping capabilities from source offsets to AST nodes, serving as the core infrastructure for editor integration (cursor positioning, selection highlighting).
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
childrenOf(
LatexNode node) → List< LatexNode> - Gets the direct child node list of a node Delegates to the LatexNode's self-describing children() method
-
collectLeaves(
LatexNode root) → List< LatexNode> - Collects all leaf nodes in the AST that have a sourceRange (flattened) Sorted by sourceRange.start
-
leafNodeAt(
LatexNode root, int offset) → LatexNode? - Gets the deepest leaf node containing the specified offset
-
nextSibling(
LatexNode parent, LatexNode child) → LatexNode? - Gets the next sibling of a specified node within its parent's child list
-
nodePathAt(
LatexNode root, int offset) → List< LatexNode> - Gets the node path containing the specified offset (from root to leaf)
-
previousSibling(
LatexNode parent, LatexNode child) → LatexNode? - Gets the previous sibling of a specified node within its parent's child list