Subtree replacement operations on green trees.
Only replaceAt is provided. rumil-scala's TreeSplicing also exposes
replaceChildRange, findNode, and pathToOffset, but its
IncrementalParser uses none of them — it splices exclusively through
replaceAt (token-level and block-level paths alike). pathToOffset is
in any case redundant here: RedTree.nodeAt(offset).pathFromRoot already
gives a splice path from an offset. So those three are deliberately not
ported — building them ahead of a consumer would be speculative surface
area. A range-replace can be added additively if a real consumer needs
one.
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
-
replaceAt<
Tok, Syn> (GreenNode< Tok, Syn> root, List<int> path, GreenNode<Tok, Syn> replacement) → GreenNode<Tok, Syn> ? -
Replace the node at
pathinrootwithreplacement, returning a new root. Returns null ifpathdoes not resolve — an index out of range, or descending into a leaf (GreenToken / GreenMissing) that has no children.