Skip to main content

read_x_until

Function read_x_until 

Source
pub fn read_x_until(until: &Token) -> Result<Tokens>
Expand description

Convenience method wrapping around read_until — EOF degrades to empty (callers that need to distinguish use read_until directly). Expanding delimited scan: read tokens with full expansion up to (and consuming) until, copying brace groups unexpanded once opened. The XUntil: parameter type’s reader (Perl Parameters.pm XUntil, after PR #2767 “should only expand, not digest”: a bare token push is all that remains). A \noexpand’d token collected here reverts to its plain shadowed identity, as in read_balanced: TeX’s no_expand_flag is transient (tex.web §1149-1153), so a \protect\cs pair produced under \@unexpandable@protect is stored as the plain pair, not relax markers.