@tikoci/centrs
    Preparing search index...

    Type Alias ExplainTokenClass

    ExplainTokenClass:
        | ExplainSpanClass
        | "dir"
        | "cmd"
        | "operator"
        | "arg"
        | "arg-sep"
        | "value"
        | "string"
        | "escaped"
        | "brace"
        | "unclassified"

    A token in the total, gapless byte partition (B1).

    Every byte of the analyzed input belongs to exactly one token — a contiguous, non-overlapping partition of [0, input.bytes) — sorted by start, with no gaps and tokens.map(t => slice).join("") === input. Byte-exact, inheriting the #215/#252 offset discipline. Offsets are on the analyzed text; input.positionMap applies when normalized.

    class is the vocabulary #264 B5 settled (see below); it is not an LSP/SCIP legend and does not try to be one. Every byte no analyzer claims becomes unclassified, which is a first-class answer, not a placeholder to be avoided.

    B2 so far: dir / cmd (resolved path and verb bytes, including valid path slashes), operator (26 spellings + 2 aliases, syntax-meta is a residual merge, never a source, #255), arg / arg-sep (argument names and the = that binds each one to its value, both located by args.ts), and value (argument value bytes and leaf array-literal members from data.values.occurrences, quotes included, #295).

    B5 settled which merges get their own name (commands/explain/README.md -> The vocabulary, and what earns a class, where the figures live beside the generated blocks that keep them honest): a class is split only where a consumer holding the whole envelope could not recover the distinction by joining tokens[] to another published surface on byte offsets. arg-sep is the one split that test forced, because a large minority of the = runs the arg fill paints belong to a statement whose strict arguments reading refused, so there is no ExplainArgumentToken.valueSpan to subtract one from. The per-spelling operator, per-shape value, and scope-versus-array brace merges all stay merged — the bytes, data.values.occurrences[], and structure.blocks[] already carry those distinctions.

    Type Declaration

    • ExplainSpanClass
    • "dir"
    • "cmd"
    • "operator"
    • "arg"
    • "arg-sep"

      The single = byte binding one argument name to its value (#264 B5).

      Never a comparison =, and the separation is fill order rather than a byte scan: the arg fill offers only the = its own located token names, so a comparison inside a ( ) group falls through to operator, and one inside a [ … ] substitution stays unclassified where the operator fill abstains (src/explain/operator-tokens.ts).

    • "value"
    • "string"
    • "escaped"

      One valid string-internal escape sequence — the `` and the bytes it escapes (#264).

      The one split B5's rule admits that naming the = did not make. A valid escape is recoverable from no other published surface: only INVALID escapes appear elsewhere, as bad-string-escape diagnostics. Both come from the same walk (walkStringEscapes), so a token and a diagnostic cannot disagree about which bytes are an escape, and past the first invalid escape the walk stops claiming rather than guess.

    • "brace"
    • "unclassified"