Capturing Tokens by Replaying Them: rustc's Lazy Token Capture
rustc’s parser captures macro tokens by recording a cursor snapshot plus a bump count and replaying them on demand, so tokens are materialised only for nodes that actually need …
rustc’s parser captures macro tokens by recording a cursor snapshot plus a bump count and replaying them on demand, so tokens are materialised only for nodes that actually need …
rustc’s parser unglues compound tokens like » and »= on demand, with exact span surgery so that a proc macro sees the same bytes the source had.
The macro_rules! matcher in rustc is an NFA-based parser: a set of live matcher positions advances one input token at a time, with epsilon transitions for repetitions and no …