Skip to main content

do_expand_partially

Function do_expand_partially 

Source
pub fn do_expand_partially<T: Into<Tokens>>(tokens: T) -> Result<Tokens>
Expand description

As do_expand, but stopping at the first unexpandable token of each branch (ExpansionLevel::Partial) instead of expanding to the bitter end.

What a binding wants when it needs to look at what a macro produces — resolving a \newcommand alias, say — without forcing the primitives underneath it, whose expansion has side effects the caller is not ready for.