rust/compiler/rustc_lexer
Nicholas Nethercote 37d9ea745b Improve scan_escape.
`scan_escape` currently has a fast path (for when the first char isn't
'\\') and a slow path.

This commit changes `scan_escape` so it only handles the slow path, i.e.
the actual escaping code. The fast path is inlined into the two call
sites.

This change makes the code faster, because there is no function call
overhead on the fast path. (`scan_escape` is a big function and doesn't
get inlined.)

This change also improves readability, because it removes a bunch of
mode checks on the the fast paths.
2022-02-24 17:01:01 +11:00
..
src Improve scan_escape. 2022-02-24 17:01:01 +11:00
Cargo.toml Tokenize emoji as if they were valid indentifiers 2021-11-23 20:35:07 +00:00