mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
internal: add tests for extra parser entry points
This commit is contained in:
parent
355a4bdb88
commit
3f5fc05d66
4 changed files with 46 additions and 1 deletions
|
@ -16,6 +16,7 @@ use crate::{
|
|||
SyntaxKind::{self, *},
|
||||
};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum StrStep<'a> {
|
||||
Token { kind: SyntaxKind, text: &'a str },
|
||||
Enter { kind: SyntaxKind },
|
||||
|
@ -75,7 +76,8 @@ impl<'a> LexedStr<'a> {
|
|||
builder.eat_trivias();
|
||||
(builder.sink)(StrStep::Exit);
|
||||
}
|
||||
State::PendingEnter | State::Normal => unreachable!(),
|
||||
State::PendingEnter => (),
|
||||
State::Normal => unreachable!(),
|
||||
}
|
||||
|
||||
let is_eof = builder.pos == builder.lexed.len();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue