mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Add always disabled gen parse support
This commit is contained in:
parent
983c9c122e
commit
7011094685
32 changed files with 376 additions and 55 deletions
|
@ -1,4 +1,4 @@
|
|||
use crate::{LexedStr, PrefixEntryPoint, Step};
|
||||
use crate::{Edition, LexedStr, PrefixEntryPoint, Step};
|
||||
|
||||
#[test]
|
||||
fn vis() {
|
||||
|
@ -82,11 +82,11 @@ fn meta_item() {
|
|||
|
||||
#[track_caller]
|
||||
fn check(entry: PrefixEntryPoint, input: &str, prefix: &str) {
|
||||
let lexed = LexedStr::new(input);
|
||||
let lexed = LexedStr::new(Edition::CURRENT, input);
|
||||
let input = lexed.to_input();
|
||||
|
||||
let mut n_tokens = 0;
|
||||
for step in entry.parse(&input, crate::Edition::CURRENT).iter() {
|
||||
for step in entry.parse(&input, Edition::CURRENT).iter() {
|
||||
match step {
|
||||
Step::Token { n_input_tokens, .. } => n_tokens += n_input_tokens as usize,
|
||||
Step::FloatSplit { .. } => n_tokens += 1,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue