Documentation
¶
Overview ¶
Package diff computes minimal deltas between the current enriched AST and a previous snapshot.
Index ¶
- func CursorHash(roots []*parser.ContextNode) string
- func CursorHashFlat(flat []*parser.ContextNode) string
- func CursorHashForDeltas(deltas []Delta) string
- func CursorHashForRollback(prevHeadID, targetID int64, deltas []Delta) string
- func SnapshotFromNodes(roots []*parser.ContextNode) map[string]NodeState
- type Delta
- type NodeState
- type Op
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CursorHash ¶
func CursorHash(roots []*parser.ContextNode) string
func CursorHashFlat ¶
func CursorHashFlat(flat []*parser.ContextNode) string
func CursorHashForDeltas ¶ added in v0.3.1
Hash a delta set when roots alone don't characterize the post-state (e.g., deletions).
func CursorHashForRollback ¶ added in v0.3.1
func SnapshotFromNodes ¶
func SnapshotFromNodes(roots []*parser.ContextNode) map[string]NodeState
Build a NodeState map from enriched nodes.
Types ¶
type Delta ¶
type Delta struct {
NodeID string
OldHash string
NewHash string
OldContent string
NewContent string
Op
}
Click to show internal directories.
Click to hide internal directories.