Skip to main content

read_token_across_input_ends

Function read_token_across_input_ends 

Source
pub fn read_token_across_input_ends() -> Result<Option<Token>>
Expand description

Read a token as tex.web §367 \noexpand does: get_token under scanner_status := normal, so an input level that ends here closes without a runaway (§362 end_file_reading, §336 passes) and the read goes on in the enclosing level. Crosses exactly what read_x_token drains: autoclose mouths with a parent (\input files, \scantokens pseudo-files, line remainders), never a reading_from_mouth context. A definition, text, preamble or macro argument that runs off a file’s end is still a §338 runaway: read_token stops there, and the scan recovers by its ScannerStatus (recover_at_file_end). This is what \everyeof{\noexpand} relies on (catchfile.sty:251-261, morewrites.sty:465, l3build regression-test.tex:101). Guards: noexpand_input_ends::*.