-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Recover from missing slots in delimited parsing
- Loading branch information
Showing
16 changed files
with
261 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ use {a; | |
use b; | ||
struct T; | ||
fn test() {} | ||
use {a ,, b}; |
44 changes: 44 additions & 0 deletions
44
crates/parser/test_data/parser/inline/err/0029_tuple_field_list_recovery.rast
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
SOURCE_FILE | ||
STRUCT | ||
STRUCT_KW "struct" | ||
WHITESPACE " " | ||
NAME | ||
IDENT "S" | ||
TUPLE_FIELD_LIST | ||
L_PAREN "(" | ||
STRUCT | ||
STRUCT_KW "struct" | ||
WHITESPACE " " | ||
NAME | ||
IDENT "S" | ||
SEMICOLON ";" | ||
WHITESPACE "\n" | ||
STRUCT | ||
STRUCT_KW "struct" | ||
WHITESPACE " " | ||
NAME | ||
IDENT "S" | ||
TUPLE_FIELD_LIST | ||
L_PAREN "(" | ||
TUPLE_FIELD | ||
PATH_TYPE | ||
PATH | ||
PATH_SEGMENT | ||
NAME_REF | ||
IDENT "A" | ||
COMMA "," | ||
ERROR | ||
COMMA "," | ||
TUPLE_FIELD | ||
PATH_TYPE | ||
PATH | ||
PATH_SEGMENT | ||
NAME_REF | ||
IDENT "B" | ||
R_PAREN ")" | ||
SEMICOLON ";" | ||
WHITESPACE "\n" | ||
error 9: expected a type | ||
error 9: expected R_PAREN | ||
error 9: expected SEMICOLON | ||
error 30: expected tuple field |
2 changes: 2 additions & 0 deletions
2
crates/parser/test_data/parser/inline/err/0029_tuple_field_list_recovery.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
struct S(struct S; | ||
struct S(A,,B); |
33 changes: 33 additions & 0 deletions
33
crates/parser/test_data/parser/inline/err/0030_generic_arg_list_recover.rast
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
SOURCE_FILE | ||
TYPE_ALIAS | ||
TYPE_KW "type" | ||
WHITESPACE " " | ||
NAME | ||
IDENT "T" | ||
WHITESPACE " " | ||
EQ "=" | ||
WHITESPACE " " | ||
PATH_TYPE | ||
PATH | ||
PATH_SEGMENT | ||
NAME_REF | ||
IDENT "T" | ||
GENERIC_ARG_LIST | ||
L_ANGLE "<" | ||
CONST_ARG | ||
LITERAL | ||
INT_NUMBER "0" | ||
COMMA "," | ||
WHITESPACE " " | ||
ERROR | ||
COMMA "," | ||
TYPE_ARG | ||
PATH_TYPE | ||
PATH | ||
PATH_SEGMENT | ||
NAME_REF | ||
IDENT "T" | ||
R_ANGLE ">" | ||
SEMICOLON ";" | ||
WHITESPACE "\n" | ||
error 14: expected generic argument |
1 change: 1 addition & 0 deletions
1
crates/parser/test_data/parser/inline/err/0030_generic_arg_list_recover.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
type T = T<0, ,T>; |
Oops, something went wrong.