Answer architecture round 1: one invariant phrase in internal/invariant, held across every package, Source built by Dir and FS, coverage counted across packages, and file items 112 and 113

This commit is contained in:
2026-10-05 15:44:38 +02:00
committed by Lillem4n
parent 835cdb57d4
commit dd2fe61b13
26 changed files with 144 additions and 95 deletions
+2 -1
View File
@@ -5,6 +5,7 @@ import (
"strings"
"github.com/larvit/fejkdata/internal/grammar"
"github.com/larvit/fejkdata/internal/invariant"
)
// refBinding is what a reference resolves to: the head its category is held
@@ -83,7 +84,7 @@ func compileArms(t *template) {
func compileArm(t *template, a *arm) {
head := t.head(a.head)
if head == nil {
panic(internalError("{%s} reads a head nothing bound", a.spelling))
panic(invariant.Broken("{%s} reads a head nothing bound", a.spelling))
}
w := compilePath(head, a.tail)
a.steps, a.leaves = w.steps, w.leaves