Skip to main content

scan_regions

Function scan_regions 

Source
pub fn scan_regions<'a>(src: &'a str, name: &str) -> Vec<Region<'a>>
Expand description

Finds every name!( ... ) invocation in src, in source order.

The scan is the one the lexer runs: a region ends at the parenthesis that balances the one that opened it, parentheses inside a string literal or a // comment do not count, and a name!( written inside a string literal or a comment is not an invocation. Scanning stops at a region that is never closed, so every region returned is complete.