Skip to main content

do_expand

Function do_expand 

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

Fully expand tokens and return the result, without digesting them.

Port of Perl Package.pm:Expand L950-955. The tokens are read from a fresh mouth wrapped in {} and consumed with readBalanced — the braces are what bound the expansion to exactly this material, so an unbalanced or runaway body cannot walk off into whatever follows in the real input.

See do_expand_partially for the expand-until-unexpandable variant.