1
Fork 0
rust/compiler/rustc_parse/src
Nicholas Nethercote aa6bfaf04b Make rustc_lexer::cursor::Cursor public.
`Cursor` is currently hidden, and the main tokenization path uses
`rustc_lexer::first_token` which involves constructing a new `Cursor`
for every single token, which is weird. Also, `first_token` also can't
handle empty input, so callers have to check for that first.

This commit makes `Cursor` public, so `StringReader` can contain a
`Cursor`, which results in a simpler structure. The commit also changes
`StringReader::advance_token` so it returns an `Option<Token>`,
simplifying the the empty input case.
2022-09-26 13:36:35 +10:00
..
lexer Make rustc_lexer::cursor::Cursor public. 2022-09-26 13:36:35 +10:00
parser FIX - adopt new Diagnostic naming in newly migrated modules 2022-09-21 11:43:22 -04:00
lib.rs Only enable the let_else feature on bootstrap 2022-09-15 21:06:45 +02:00
validate_attr.rs Overhaul MacArgs::Eq. 2022-05-05 07:06:12 +10:00