Give prove, stepInto and columnItems a case per node kind, panicking on the rest

This commit is contained in:
2026-09-29 09:37:32 +02:00
committed by Lillem4n
parent d01c914e7f
commit 16e4f4ebbb
5 changed files with 14 additions and 9 deletions
+5 -1
View File
@@ -89,10 +89,14 @@ func (p *valueProof) prove(n node) proven {
v = p.proveTemplate(n)
case *tableColumn:
v = p.proveCells(n)
case *table:
v = p.prove(n.rowNode)
case *tableRow:
v = unproven(fmt.Sprintf("%q renders a row of %s, which is composed text", n.t.formatTemplate.format, n.t.segment))
default:
case *nullItem:
v = unproven(`it reads a null, which renders "" outside its own column`)
default:
panic(internalError("prove has no case for node %T", n))
}
p.memo[n] = v
return v