pub struct VerbCtx { /* private fields */ }Expand description
Per-parse lexer context carrying user-defined verbatim constructs — those a
document declares with catcode manipulation (\@makeother\$, …), found by scanning
definition bodies (crate::semantic::define). The lexer consults it (alongside
the built-in DB) to capture a verbatim command’s final argument as one VERB
token, and a verbatim environment’s body as one VERBATIM_BODY token. Empty for
the first parse pass; populated for the second when the document defines any (see
parser::core).
A command entry maps a name (no leading \) to its leading, non-verbatim
argument shape, the verbatim argument itself being implicit — matching the built-in
convention. An environment entry maps a name to its full argument shape (an
environment’s args are all leading; its body follows the \begin{…} arguments), so
presence in environments means the environment is verbatim.
suppressed names the inverse case: commands the current file redefines to an
ordinary (non-verbatim) macro whose name collides with a built-in braced-verbatim
command (\code, \url, \path, …). A local definition shadows the built-in, so
[lex_verbatim_command] must lex \code{…} as an ordinary group rather than capture
the built-in VERB (follow-up to issue #53). We read only static definition facts (a
visible \newcommand/\def with no catcode signal), never macro meaning.