mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-25 20:43:21 +00:00
Add recovery test
This commit is contained in:
parent
83aa6f0899
commit
0663c24222
2 changed files with 37 additions and 0 deletions
9
tests/data/parser/err/0007_stray_curly_in_file.rs
Normal file
9
tests/data/parser/err/0007_stray_curly_in_file.rs
Normal file
|
@ -0,0 +1,9 @@
|
|||
}
|
||||
|
||||
struct S;
|
||||
|
||||
}
|
||||
|
||||
fn foo(){}
|
||||
|
||||
}
|
28
tests/data/parser/err/0007_stray_curly_in_file.txt
Normal file
28
tests/data/parser/err/0007_stray_curly_in_file.txt
Normal file
|
@ -0,0 +1,28 @@
|
|||
FILE@[0; 31)
|
||||
ERROR@[0; 3)
|
||||
err: `expected item`
|
||||
R_CURLY@[0; 1)
|
||||
WHITESPACE@[1; 3)
|
||||
STRUCT_ITEM@[3; 14)
|
||||
STRUCT_KW@[3; 9)
|
||||
WHITESPACE@[9; 10)
|
||||
IDENT@[10; 11)
|
||||
SEMI@[11; 12)
|
||||
WHITESPACE@[12; 14)
|
||||
ERROR@[14; 17)
|
||||
err: `expected item`
|
||||
R_CURLY@[14; 15)
|
||||
WHITESPACE@[15; 17)
|
||||
FN_ITEM@[17; 29)
|
||||
FN_KW@[17; 19)
|
||||
WHITESPACE@[19; 20)
|
||||
IDENT@[20; 23)
|
||||
L_PAREN@[23; 24)
|
||||
R_PAREN@[24; 25)
|
||||
L_CURLY@[25; 26)
|
||||
R_CURLY@[26; 27)
|
||||
WHITESPACE@[27; 29)
|
||||
ERROR@[29; 31)
|
||||
err: `expected item`
|
||||
R_CURLY@[29; 30)
|
||||
WHITESPACE@[30; 31)
|
Loading…
Reference in a new issue