diff options
Diffstat (limited to 'crates/libsyntax2/tests/data/parser/inline')
10 files changed, 154 insertions, 139 deletions
diff --git a/crates/libsyntax2/tests/data/parser/inline/0016_type_item_where_clause.txt b/crates/libsyntax2/tests/data/parser/inline/0016_type_item_where_clause.txt index 5309b9a7b..c3fca013e 100644 --- a/crates/libsyntax2/tests/data/parser/inline/0016_type_item_where_clause.txt +++ b/crates/libsyntax2/tests/data/parser/inline/0016_type_item_where_clause.txt | |||
@@ -16,11 +16,12 @@ ROOT@[0; 31) | |||
16 | IDENT@[15; 18) "Foo" | 16 | IDENT@[15; 18) "Foo" |
17 | COLON@[18; 19) | 17 | COLON@[18; 19) |
18 | WHITESPACE@[19; 20) | 18 | WHITESPACE@[19; 20) |
19 | PATH@[20; 24) | 19 | PATH_TYPE@[20; 24) |
20 | PATH_SEGMENT@[20; 24) | 20 | PATH@[20; 24) |
21 | NAME_REF@[20; 24) | 21 | PATH_SEGMENT@[20; 24) |
22 | IDENT@[20; 24) "Copy" | 22 | NAME_REF@[20; 24) |
23 | err: `expected COMMA` | 23 | IDENT@[20; 24) "Copy" |
24 | err: `expected COMMA` | ||
24 | WHITESPACE@[24; 25) | 25 | WHITESPACE@[24; 25) |
25 | EQ@[25; 26) | 26 | EQ@[25; 26) |
26 | WHITESPACE@[26; 27) | 27 | WHITESPACE@[26; 27) |
diff --git a/crates/libsyntax2/tests/data/parser/inline/0041_type_param_bounds.txt b/crates/libsyntax2/tests/data/parser/inline/0041_type_param_bounds.txt index ef9d1f31e..549b571c2 100644 --- a/crates/libsyntax2/tests/data/parser/inline/0041_type_param_bounds.txt +++ b/crates/libsyntax2/tests/data/parser/inline/0041_type_param_bounds.txt | |||
@@ -16,19 +16,21 @@ ROOT@[0; 35) | |||
16 | PLUS@[15; 16) | 16 | PLUS@[15; 16) |
17 | WHITESPACE@[16; 17) | 17 | WHITESPACE@[16; 17) |
18 | QUESTION@[17; 18) | 18 | QUESTION@[17; 18) |
19 | PATH@[18; 23) | 19 | PATH_TYPE@[18; 32) |
20 | PATH_SEGMENT@[18; 23) | 20 | PATH@[18; 23) |
21 | NAME_REF@[18; 23) | 21 | PATH_SEGMENT@[18; 23) |
22 | IDENT@[18; 23) "Sized" | 22 | NAME_REF@[18; 23) |
23 | WHITESPACE@[23; 24) | 23 | IDENT@[18; 23) "Sized" |
24 | PLUS@[24; 25) | 24 | WHITESPACE@[23; 24) |
25 | WHITESPACE@[25; 26) | 25 | PLUS@[24; 25) |
26 | L_PAREN@[26; 27) | 26 | WHITESPACE@[25; 26) |
27 | PATH@[27; 31) | 27 | L_PAREN@[26; 27) |
28 | PATH_SEGMENT@[27; 31) | 28 | PATH_TYPE@[27; 31) |
29 | NAME_REF@[27; 31) | 29 | PATH@[27; 31) |
30 | IDENT@[27; 31) "Copy" | 30 | PATH_SEGMENT@[27; 31) |
31 | R_PAREN@[31; 32) | 31 | NAME_REF@[27; 31) |
32 | IDENT@[27; 31) "Copy" | ||
33 | R_PAREN@[31; 32) | ||
32 | R_ANGLE@[32; 33) | 34 | R_ANGLE@[32; 33) |
33 | SEMI@[33; 34) | 35 | SEMI@[33; 34) |
34 | WHITESPACE@[34; 35) | 36 | WHITESPACE@[34; 35) |
diff --git a/crates/libsyntax2/tests/data/parser/inline/0049_trait_item_list.txt b/crates/libsyntax2/tests/data/parser/inline/0049_trait_item_list.txt index e18c166f6..72d9220e8 100644 --- a/crates/libsyntax2/tests/data/parser/inline/0049_trait_item_list.txt +++ b/crates/libsyntax2/tests/data/parser/inline/0049_trait_item_list.txt | |||
@@ -18,10 +18,11 @@ ROOT@[0; 83) | |||
18 | IDENT@[18; 19) "A" | 18 | IDENT@[18; 19) "A" |
19 | COLON@[19; 20) | 19 | COLON@[19; 20) |
20 | WHITESPACE@[20; 21) | 20 | WHITESPACE@[20; 21) |
21 | PATH@[21; 26) | 21 | PATH_TYPE@[21; 26) |
22 | PATH_SEGMENT@[21; 26) | 22 | PATH@[21; 26) |
23 | NAME_REF@[21; 26) | 23 | PATH_SEGMENT@[21; 26) |
24 | IDENT@[21; 26) "Clone" | 24 | NAME_REF@[21; 26) |
25 | IDENT@[21; 26) "Clone" | ||
25 | SEMI@[26; 27) | 26 | SEMI@[26; 27) |
26 | WHITESPACE@[27; 32) | 27 | WHITESPACE@[27; 32) |
27 | CONST_DEF@[32; 45) | 28 | CONST_DEF@[32; 45) |
diff --git a/crates/libsyntax2/tests/data/parser/inline/0056_trait_item.txt b/crates/libsyntax2/tests/data/parser/inline/0056_trait_item.txt index 6e9ddcfb4..40c77db4b 100644 --- a/crates/libsyntax2/tests/data/parser/inline/0056_trait_item.txt +++ b/crates/libsyntax2/tests/data/parser/inline/0056_trait_item.txt | |||
@@ -12,17 +12,19 @@ ROOT@[0; 42) | |||
12 | R_ANGLE@[9; 10) | 12 | R_ANGLE@[9; 10) |
13 | COLON@[10; 11) | 13 | COLON@[10; 11) |
14 | WHITESPACE@[11; 12) | 14 | WHITESPACE@[11; 12) |
15 | PATH@[12; 16) | 15 | PATH_TYPE@[12; 24) |
16 | PATH_SEGMENT@[12; 16) | 16 | PATH@[12; 16) |
17 | NAME_REF@[12; 16) | 17 | PATH_SEGMENT@[12; 16) |
18 | IDENT@[12; 16) "Hash" | 18 | NAME_REF@[12; 16) |
19 | WHITESPACE@[16; 17) | 19 | IDENT@[12; 16) "Hash" |
20 | PLUS@[17; 18) | 20 | WHITESPACE@[16; 17) |
21 | WHITESPACE@[18; 19) | 21 | PLUS@[17; 18) |
22 | PATH@[19; 24) | 22 | WHITESPACE@[18; 19) |
23 | PATH_SEGMENT@[19; 24) | 23 | PATH_TYPE@[19; 24) |
24 | NAME_REF@[19; 24) | 24 | PATH@[19; 24) |
25 | IDENT@[19; 24) "Clone" | 25 | PATH_SEGMENT@[19; 24) |
26 | NAME_REF@[19; 24) | ||
27 | IDENT@[19; 24) "Clone" | ||
26 | WHITESPACE@[24; 25) | 28 | WHITESPACE@[24; 25) |
27 | WHERE_CLAUSE@[25; 38) | 29 | WHERE_CLAUSE@[25; 38) |
28 | WHERE_KW@[25; 30) | 30 | WHERE_KW@[25; 30) |
@@ -35,10 +37,11 @@ ROOT@[0; 42) | |||
35 | IDENT@[31; 32) "U" | 37 | IDENT@[31; 32) "U" |
36 | COLON@[32; 33) | 38 | COLON@[32; 33) |
37 | WHITESPACE@[33; 34) | 39 | WHITESPACE@[33; 34) |
38 | PATH@[34; 38) | 40 | PATH_TYPE@[34; 38) |
39 | PATH_SEGMENT@[34; 38) | 41 | PATH@[34; 38) |
40 | NAME_REF@[34; 38) | 42 | PATH_SEGMENT@[34; 38) |
41 | IDENT@[34; 38) "Copy" | 43 | NAME_REF@[34; 38) |
44 | IDENT@[34; 38) "Copy" | ||
42 | WHITESPACE@[38; 39) | 45 | WHITESPACE@[38; 39) |
43 | ITEM_LIST@[39; 41) | 46 | ITEM_LIST@[39; 41) |
44 | L_CURLY@[39; 40) | 47 | L_CURLY@[39; 40) |
diff --git a/crates/libsyntax2/tests/data/parser/inline/0059_function_where_clause.txt b/crates/libsyntax2/tests/data/parser/inline/0059_function_where_clause.txt index dc90bfc28..281e79deb 100644 --- a/crates/libsyntax2/tests/data/parser/inline/0059_function_where_clause.txt +++ b/crates/libsyntax2/tests/data/parser/inline/0059_function_where_clause.txt | |||
@@ -25,10 +25,11 @@ ROOT@[0; 29) | |||
25 | IDENT@[18; 19) "T" | 25 | IDENT@[18; 19) "T" |
26 | COLON@[19; 20) | 26 | COLON@[19; 20) |
27 | WHITESPACE@[20; 21) | 27 | WHITESPACE@[20; 21) |
28 | PATH@[21; 25) | 28 | PATH_TYPE@[21; 25) |
29 | PATH_SEGMENT@[21; 25) | 29 | PATH@[21; 25) |
30 | NAME_REF@[21; 25) | 30 | PATH_SEGMENT@[21; 25) |
31 | IDENT@[21; 25) "Copy" | 31 | NAME_REF@[21; 25) |
32 | IDENT@[21; 25) "Copy" | ||
32 | WHITESPACE@[25; 26) | 33 | WHITESPACE@[25; 26) |
33 | BLOCK@[26; 28) | 34 | BLOCK@[26; 28) |
34 | L_CURLY@[26; 27) | 35 | L_CURLY@[26; 27) |
diff --git a/crates/libsyntax2/tests/data/parser/inline/0060_function_type_params.txt b/crates/libsyntax2/tests/data/parser/inline/0060_function_type_params.txt index 640a84355..b6fea5ab2 100644 --- a/crates/libsyntax2/tests/data/parser/inline/0060_function_type_params.txt +++ b/crates/libsyntax2/tests/data/parser/inline/0060_function_type_params.txt | |||
@@ -11,17 +11,19 @@ ROOT@[0; 28) | |||
11 | IDENT@[7; 8) "T" | 11 | IDENT@[7; 8) "T" |
12 | COLON@[8; 9) | 12 | COLON@[8; 9) |
13 | WHITESPACE@[9; 10) | 13 | WHITESPACE@[9; 10) |
14 | PATH@[10; 15) | 14 | PATH_TYPE@[10; 22) |
15 | PATH_SEGMENT@[10; 15) | 15 | PATH@[10; 15) |
16 | NAME_REF@[10; 15) | 16 | PATH_SEGMENT@[10; 15) |
17 | IDENT@[10; 15) "Clone" | 17 | NAME_REF@[10; 15) |
18 | WHITESPACE@[15; 16) | 18 | IDENT@[10; 15) "Clone" |
19 | PLUS@[16; 17) | 19 | WHITESPACE@[15; 16) |
20 | WHITESPACE@[17; 18) | 20 | PLUS@[16; 17) |
21 | PATH@[18; 22) | 21 | WHITESPACE@[17; 18) |
22 | PATH_SEGMENT@[18; 22) | 22 | PATH_TYPE@[18; 22) |
23 | NAME_REF@[18; 22) | 23 | PATH@[18; 22) |
24 | IDENT@[18; 22) "Copy" | 24 | PATH_SEGMENT@[18; 22) |
25 | NAME_REF@[18; 22) | ||
26 | IDENT@[18; 22) "Copy" | ||
25 | R_ANGLE@[22; 23) | 27 | R_ANGLE@[22; 23) |
26 | PARAM_LIST@[23; 25) | 28 | PARAM_LIST@[23; 25) |
27 | L_PAREN@[23; 24) | 29 | L_PAREN@[23; 24) |
diff --git a/crates/libsyntax2/tests/data/parser/inline/0063_impl_trait_type.txt b/crates/libsyntax2/tests/data/parser/inline/0063_impl_trait_type.txt index 4d54204f8..68fce58ee 100644 --- a/crates/libsyntax2/tests/data/parser/inline/0063_impl_trait_type.txt +++ b/crates/libsyntax2/tests/data/parser/inline/0063_impl_trait_type.txt | |||
@@ -10,30 +10,31 @@ ROOT@[0; 43) | |||
10 | IMPL_TRAIT_TYPE@[9; 41) | 10 | IMPL_TRAIT_TYPE@[9; 41) |
11 | IMPL_KW@[9; 13) | 11 | IMPL_KW@[9; 13) |
12 | WHITESPACE@[13; 14) | 12 | WHITESPACE@[13; 14) |
13 | PATH@[14; 36) | 13 | PATH_TYPE@[14; 41) |
14 | PATH_SEGMENT@[14; 36) | 14 | PATH@[14; 36) |
15 | NAME_REF@[14; 22) | 15 | PATH_SEGMENT@[14; 36) |
16 | IDENT@[14; 22) "Iterator" | 16 | NAME_REF@[14; 22) |
17 | TYPE_ARG_LIST@[22; 36) | 17 | IDENT@[14; 22) "Iterator" |
18 | L_ANGLE@[22; 23) | 18 | TYPE_ARG_LIST@[22; 36) |
19 | ASSOC_TYPE_ARG@[23; 35) | 19 | L_ANGLE@[22; 23) |
20 | NAME_REF@[23; 27) | 20 | ASSOC_TYPE_ARG@[23; 35) |
21 | IDENT@[23; 27) "Item" | 21 | NAME_REF@[23; 27) |
22 | EQ@[27; 28) | 22 | IDENT@[23; 27) "Item" |
23 | PATH_TYPE@[28; 35) | 23 | EQ@[27; 28) |
24 | PATH@[28; 35) | 24 | PATH_TYPE@[28; 35) |
25 | PATH_SEGMENT@[28; 35) | 25 | PATH@[28; 35) |
26 | NAME_REF@[28; 31) | 26 | PATH_SEGMENT@[28; 35) |
27 | IDENT@[28; 31) "Foo" | 27 | NAME_REF@[28; 31) |
28 | TYPE_ARG_LIST@[31; 35) | 28 | IDENT@[28; 31) "Foo" |
29 | L_ANGLE@[31; 32) | 29 | TYPE_ARG_LIST@[31; 35) |
30 | LIFETIME_ARG@[32; 34) | 30 | L_ANGLE@[31; 32) |
31 | LIFETIME@[32; 34) "'a" | 31 | LIFETIME_ARG@[32; 34) |
32 | R_ANGLE@[34; 35) | 32 | LIFETIME@[32; 34) "'a" |
33 | R_ANGLE@[35; 36) | 33 | R_ANGLE@[34; 35) |
34 | WHITESPACE@[36; 37) | 34 | R_ANGLE@[35; 36) |
35 | PLUS@[37; 38) | 35 | WHITESPACE@[36; 37) |
36 | WHITESPACE@[38; 39) | 36 | PLUS@[37; 38) |
37 | LIFETIME@[39; 41) "'a" | 37 | WHITESPACE@[38; 39) |
38 | LIFETIME@[39; 41) "'a" | ||
38 | SEMI@[41; 42) | 39 | SEMI@[41; 42) |
39 | WHITESPACE@[42; 43) | 40 | WHITESPACE@[42; 43) |
diff --git a/crates/libsyntax2/tests/data/parser/inline/0097_param_list_opt_patterns.txt b/crates/libsyntax2/tests/data/parser/inline/0097_param_list_opt_patterns.txt index 289a899a9..39bab8dd2 100644 --- a/crates/libsyntax2/tests/data/parser/inline/0097_param_list_opt_patterns.txt +++ b/crates/libsyntax2/tests/data/parser/inline/0097_param_list_opt_patterns.txt | |||
@@ -11,28 +11,29 @@ ROOT@[0; 35) | |||
11 | IDENT@[7; 8) "F" | 11 | IDENT@[7; 8) "F" |
12 | COLON@[8; 9) | 12 | COLON@[8; 9) |
13 | WHITESPACE@[9; 10) | 13 | WHITESPACE@[9; 10) |
14 | PATH@[10; 29) | 14 | PATH_TYPE@[10; 29) |
15 | PATH_SEGMENT@[10; 29) | 15 | PATH@[10; 29) |
16 | NAME_REF@[10; 15) | 16 | PATH_SEGMENT@[10; 29) |
17 | IDENT@[10; 15) "FnMut" | 17 | NAME_REF@[10; 15) |
18 | PARAM_LIST@[15; 29) | 18 | IDENT@[10; 15) "FnMut" |
19 | L_PAREN@[15; 16) | 19 | PARAM_LIST@[15; 29) |
20 | PARAM@[16; 28) | 20 | L_PAREN@[15; 16) |
21 | REFERENCE_TYPE@[16; 28) | 21 | PARAM@[16; 28) |
22 | AMP@[16; 17) | 22 | REFERENCE_TYPE@[16; 28) |
23 | MUT_KW@[17; 20) | 23 | AMP@[16; 17) |
24 | WHITESPACE@[20; 21) | 24 | MUT_KW@[17; 20) |
25 | PATH_TYPE@[21; 28) | 25 | WHITESPACE@[20; 21) |
26 | PATH@[21; 28) | 26 | PATH_TYPE@[21; 28) |
27 | PATH_SEGMENT@[21; 28) | 27 | PATH@[21; 28) |
28 | NAME_REF@[21; 24) | 28 | PATH_SEGMENT@[21; 28) |
29 | IDENT@[21; 24) "Foo" | 29 | NAME_REF@[21; 24) |
30 | TYPE_ARG_LIST@[24; 28) | 30 | IDENT@[21; 24) "Foo" |
31 | L_ANGLE@[24; 25) | 31 | TYPE_ARG_LIST@[24; 28) |
32 | LIFETIME_ARG@[25; 27) | 32 | L_ANGLE@[24; 25) |
33 | LIFETIME@[25; 27) "'a" | 33 | LIFETIME_ARG@[25; 27) |
34 | R_ANGLE@[27; 28) | 34 | LIFETIME@[25; 27) "'a" |
35 | R_PAREN@[28; 29) | 35 | R_ANGLE@[27; 28) |
36 | R_PAREN@[28; 29) | ||
36 | R_ANGLE@[29; 30) | 37 | R_ANGLE@[29; 30) |
37 | PARAM_LIST@[30; 32) | 38 | PARAM_LIST@[30; 32) |
38 | L_PAREN@[30; 31) | 39 | L_PAREN@[30; 31) |
diff --git a/crates/libsyntax2/tests/data/parser/inline/0098_where_clause.txt b/crates/libsyntax2/tests/data/parser/inline/0098_where_clause.txt index 7642c0704..9fe803554 100644 --- a/crates/libsyntax2/tests/data/parser/inline/0098_where_clause.txt +++ b/crates/libsyntax2/tests/data/parser/inline/0098_where_clause.txt | |||
@@ -30,21 +30,23 @@ ROOT@[0; 87) | |||
30 | IDENT@[34; 35) "T" | 30 | IDENT@[34; 35) "T" |
31 | COLON@[35; 36) | 31 | COLON@[35; 36) |
32 | WHITESPACE@[36; 37) | 32 | WHITESPACE@[36; 37) |
33 | PATH@[37; 42) | 33 | PATH_TYPE@[37; 59) |
34 | PATH_SEGMENT@[37; 42) | 34 | PATH@[37; 42) |
35 | NAME_REF@[37; 42) | 35 | PATH_SEGMENT@[37; 42) |
36 | IDENT@[37; 42) "Clone" | 36 | NAME_REF@[37; 42) |
37 | WHITESPACE@[42; 43) | 37 | IDENT@[37; 42) "Clone" |
38 | PLUS@[43; 44) | 38 | WHITESPACE@[42; 43) |
39 | WHITESPACE@[44; 45) | 39 | PLUS@[43; 44) |
40 | PATH@[45; 49) | 40 | WHITESPACE@[44; 45) |
41 | PATH_SEGMENT@[45; 49) | 41 | PATH_TYPE@[45; 59) |
42 | NAME_REF@[45; 49) | 42 | PATH@[45; 49) |
43 | IDENT@[45; 49) "Copy" | 43 | PATH_SEGMENT@[45; 49) |
44 | WHITESPACE@[49; 50) | 44 | NAME_REF@[45; 49) |
45 | PLUS@[50; 51) | 45 | IDENT@[45; 49) "Copy" |
46 | WHITESPACE@[51; 52) | 46 | WHITESPACE@[49; 50) |
47 | LIFETIME@[52; 59) "'static" | 47 | PLUS@[50; 51) |
48 | WHITESPACE@[51; 52) | ||
49 | LIFETIME@[52; 59) "'static" | ||
48 | COMMA@[59; 60) | 50 | COMMA@[59; 60) |
49 | WHITESPACE@[60; 64) | 51 | WHITESPACE@[60; 64) |
50 | WHERE_PRED@[64; 82) | 52 | WHERE_PRED@[64; 82) |
diff --git a/crates/libsyntax2/tests/data/parser/inline/0100_dyn_trait_type.txt b/crates/libsyntax2/tests/data/parser/inline/0100_dyn_trait_type.txt index ca53c0b52..c81ae5545 100644 --- a/crates/libsyntax2/tests/data/parser/inline/0100_dyn_trait_type.txt +++ b/crates/libsyntax2/tests/data/parser/inline/0100_dyn_trait_type.txt | |||
@@ -10,30 +10,31 @@ ROOT@[0; 42) | |||
10 | DYN_TRAIT_TYPE@[9; 40) | 10 | DYN_TRAIT_TYPE@[9; 40) |
11 | DYN_KW@[9; 12) | 11 | DYN_KW@[9; 12) |
12 | WHITESPACE@[12; 13) | 12 | WHITESPACE@[12; 13) |
13 | PATH@[13; 35) | 13 | PATH_TYPE@[13; 40) |
14 | PATH_SEGMENT@[13; 35) | 14 | PATH@[13; 35) |
15 | NAME_REF@[13; 21) | 15 | PATH_SEGMENT@[13; 35) |
16 | IDENT@[13; 21) "Iterator" | 16 | NAME_REF@[13; 21) |
17 | TYPE_ARG_LIST@[21; 35) | 17 | IDENT@[13; 21) "Iterator" |
18 | L_ANGLE@[21; 22) | 18 | TYPE_ARG_LIST@[21; 35) |
19 | ASSOC_TYPE_ARG@[22; 34) | 19 | L_ANGLE@[21; 22) |
20 | NAME_REF@[22; 26) | 20 | ASSOC_TYPE_ARG@[22; 34) |
21 | IDENT@[22; 26) "Item" | 21 | NAME_REF@[22; 26) |
22 | EQ@[26; 27) | 22 | IDENT@[22; 26) "Item" |
23 | PATH_TYPE@[27; 34) | 23 | EQ@[26; 27) |
24 | PATH@[27; 34) | 24 | PATH_TYPE@[27; 34) |
25 | PATH_SEGMENT@[27; 34) | 25 | PATH@[27; 34) |
26 | NAME_REF@[27; 30) | 26 | PATH_SEGMENT@[27; 34) |
27 | IDENT@[27; 30) "Foo" | 27 | NAME_REF@[27; 30) |
28 | TYPE_ARG_LIST@[30; 34) | 28 | IDENT@[27; 30) "Foo" |
29 | L_ANGLE@[30; 31) | 29 | TYPE_ARG_LIST@[30; 34) |
30 | LIFETIME_ARG@[31; 33) | 30 | L_ANGLE@[30; 31) |
31 | LIFETIME@[31; 33) "'a" | 31 | LIFETIME_ARG@[31; 33) |
32 | R_ANGLE@[33; 34) | 32 | LIFETIME@[31; 33) "'a" |
33 | R_ANGLE@[34; 35) | 33 | R_ANGLE@[33; 34) |
34 | WHITESPACE@[35; 36) | 34 | R_ANGLE@[34; 35) |
35 | PLUS@[36; 37) | 35 | WHITESPACE@[35; 36) |
36 | WHITESPACE@[37; 38) | 36 | PLUS@[36; 37) |
37 | LIFETIME@[38; 40) "'a" | 37 | WHITESPACE@[37; 38) |
38 | LIFETIME@[38; 40) "'a" | ||
38 | SEMI@[40; 41) | 39 | SEMI@[40; 41) |
39 | WHITESPACE@[41; 42) | 40 | WHITESPACE@[41; 42) |