Trim comments that restate or argue

The operand order was written out in three places; it now lives at calcVars,
which fixes it, and the other two point there. Dropped the note explaining
why ')' is not reserved, which said what the set is not rather than what it
is, and shortened reservedList's doc to less than its body. The note on held
now states where it reaches instead of arguing against a design this repo no
longer contains.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
M
2026-08-31 13:43:19 +02:00
committed by lilleman-tw
parent 1b5e928d4f
commit 909596ec2d
3 changed files with 6 additions and 10 deletions
+1 -3
View File
@@ -257,11 +257,9 @@ func weightOf(raw any) (float64, error) {
// separates the segments of a path, '|' the arms of a token, '(' opens a function
// call and '}' ends the token. A name carrying one is reachable by no format, so it
// is rejected where it is authored rather than at the token that cannot reach it.
// ')' is absent deliberately — it is spellable on its own, so it stays legal.
const reservedInName = ".|(}"
// reservedList is reservedInName spelled out for an error message, so the two
// cannot drift apart.
// reservedList spells reservedInName for an error message, so the two cannot drift.
var reservedList = strings.Join(strings.Split(reservedInName, ""), " ")
// checkName rejects a name the dot path and {token} grammars cannot spell. Both a