pub fn read_tokens_value() -> Result<Tokens>Expand description
The right-hand side of a token-list assignment, \toks<n>=…, \everypar=…
(tex.web §1226-1227), after its optional =: the next non-blank
non-\relax token, expanding (§404, get_x_token, which at a file’s end
goes on in the enclosing input). A left brace, explicit or implicit
(\toks0=\bgroup abc}), opens the balanced text, read at absorbing
status (scan_toks(false, false), read_balanced_text); a token-list
register or parameter gives its value. Any other token is the value
itself, as in Perl (Gullet.pm:824-842 readTokensValue), after TeX’s
error, “Missing { inserted” (§403 scan_left_brace; TeX then absorbs up to
the next }).
Perl reads the token unexpanded and recurses on an expandable one, so a
\relax, an implicit brace or a file end before the text lost it:
Paul Taylor’s diagrams.sty:15 \toks0=\bgroup} stored \bgroup, and its
} closed a group (arXiv 2605.02221, 2605.25087).
Guards: token_kernel_gaps::*.