Split walkPath's four modes into walkers of their own, sharing how a path steps

This commit is contained in:
2026-09-28 00:19:43 +02:00
committed by Lillem4n
parent 9126e0e07d
commit 94eb7aa81f
7 changed files with 261 additions and 187 deletions
+3 -2
View File
@@ -32,8 +32,9 @@ func tableReadOf(head node, a arm, leaf node) *tableRead {
if !isTable {
return nil
}
tr := &tableRead{headTable: t, drawn: map[*table]bool{}}
_, _ = walkPath(t, a.tail, pathWalk{mode: walkProbe, pins: &tr.pins, drawn: tr.drawn})
probe := &probeWalk{}
_, _ = probe.walk(t, a.tail)
tr := &tableRead{headTable: t, pins: probe.pins, drawn: probe.drawn}
written := a.spelling[:len(a.spelling)-len(joinSegments(a.tail))]
cur := t
for i, seg := range a.tail {