Skip to main content

read_x_token

Function read_x_token 

Source
pub fn read_x_token(
    toplevel_opt: Option<bool>,
    for_conditional: bool,
    fully_expand_opt: Option<bool>,
) -> Result<Option<Token>>
Expand description

Read the next non-expandable token, expanding until one appears. Hot path — read_token is folded in. toplevel (default true): on mouth exhaustion, step to the containing mouth. fully_expand (default = toplevel): expand even protected defns (“for execution”). Unlike read_balanced, does NOT defer \the & friends; \noexpand’d tokens act like \relax. For \if/ \ifx arguments pass for_conditional=true (handles \noexpand and CS \let to tokens specially).