diff options
Diffstat (limited to 'crates/ra_syntax/test_data/parser/inline/ok')
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0111_tuple_pat.rs | 3 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0111_tuple_pat.txt | 62 |
2 files changed, 58 insertions, 7 deletions
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0111_tuple_pat.rs b/crates/ra_syntax/test_data/parser/inline/ok/0111_tuple_pat.rs index f785acd36..ba719879d 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0111_tuple_pat.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0111_tuple_pat.rs | |||
@@ -1,3 +1,6 @@ | |||
1 | fn main() { | 1 | fn main() { |
2 | let (a, b, ..) = (); | 2 | let (a, b, ..) = (); |
3 | let (a,) = (); | ||
4 | let (..) = (); | ||
5 | let () = (); | ||
3 | } | 6 | } |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0111_tuple_pat.txt b/crates/ra_syntax/test_data/parser/inline/ok/0111_tuple_pat.txt index 674dec493..4680c267e 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0111_tuple_pat.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0111_tuple_pat.txt | |||
@@ -1,5 +1,5 @@ | |||
1 | SOURCE_FILE@[0; 39) | 1 | SOURCE_FILE@[0; 94) |
2 | FN_DEF@[0; 38) | 2 | FN_DEF@[0; 93) |
3 | FN_KW@[0; 2) "fn" | 3 | FN_KW@[0; 2) "fn" |
4 | WHITESPACE@[2; 3) " " | 4 | WHITESPACE@[2; 3) " " |
5 | NAME@[3; 7) | 5 | NAME@[3; 7) |
@@ -8,8 +8,8 @@ SOURCE_FILE@[0; 39) | |||
8 | L_PAREN@[7; 8) "(" | 8 | L_PAREN@[7; 8) "(" |
9 | R_PAREN@[8; 9) ")" | 9 | R_PAREN@[8; 9) ")" |
10 | WHITESPACE@[9; 10) " " | 10 | WHITESPACE@[9; 10) " " |
11 | BLOCK_EXPR@[10; 38) | 11 | BLOCK_EXPR@[10; 93) |
12 | BLOCK@[10; 38) | 12 | BLOCK@[10; 93) |
13 | L_CURLY@[10; 11) "{" | 13 | L_CURLY@[10; 11) "{" |
14 | WHITESPACE@[11; 16) "\n " | 14 | WHITESPACE@[11; 16) "\n " |
15 | LET_STMT@[16; 36) | 15 | LET_STMT@[16; 36) |
@@ -37,6 +37,54 @@ SOURCE_FILE@[0; 39) | |||
37 | L_PAREN@[33; 34) "(" | 37 | L_PAREN@[33; 34) "(" |
38 | R_PAREN@[34; 35) ")" | 38 | R_PAREN@[34; 35) ")" |
39 | SEMI@[35; 36) ";" | 39 | SEMI@[35; 36) ";" |
40 | WHITESPACE@[36; 37) "\n" | 40 | WHITESPACE@[36; 41) "\n " |
41 | R_CURLY@[37; 38) "}" | 41 | LET_STMT@[41; 55) |
42 | WHITESPACE@[38; 39) "\n" | 42 | LET_KW@[41; 44) "let" |
43 | WHITESPACE@[44; 45) " " | ||
44 | TUPLE_PAT@[45; 49) | ||
45 | L_PAREN@[45; 46) "(" | ||
46 | BIND_PAT@[46; 47) | ||
47 | NAME@[46; 47) | ||
48 | IDENT@[46; 47) "a" | ||
49 | COMMA@[47; 48) "," | ||
50 | R_PAREN@[48; 49) ")" | ||
51 | WHITESPACE@[49; 50) " " | ||
52 | EQ@[50; 51) "=" | ||
53 | WHITESPACE@[51; 52) " " | ||
54 | TUPLE_EXPR@[52; 54) | ||
55 | L_PAREN@[52; 53) "(" | ||
56 | R_PAREN@[53; 54) ")" | ||
57 | SEMI@[54; 55) ";" | ||
58 | WHITESPACE@[55; 60) "\n " | ||
59 | LET_STMT@[60; 74) | ||
60 | LET_KW@[60; 63) "let" | ||
61 | WHITESPACE@[63; 64) " " | ||
62 | TUPLE_PAT@[64; 68) | ||
63 | L_PAREN@[64; 65) "(" | ||
64 | DOT_DOT_PAT@[65; 67) | ||
65 | DOTDOT@[65; 67) ".." | ||
66 | R_PAREN@[67; 68) ")" | ||
67 | WHITESPACE@[68; 69) " " | ||
68 | EQ@[69; 70) "=" | ||
69 | WHITESPACE@[70; 71) " " | ||
70 | TUPLE_EXPR@[71; 73) | ||
71 | L_PAREN@[71; 72) "(" | ||
72 | R_PAREN@[72; 73) ")" | ||
73 | SEMI@[73; 74) ";" | ||
74 | WHITESPACE@[74; 79) "\n " | ||
75 | LET_STMT@[79; 91) | ||
76 | LET_KW@[79; 82) "let" | ||
77 | WHITESPACE@[82; 83) " " | ||
78 | TUPLE_PAT@[83; 85) | ||
79 | L_PAREN@[83; 84) "(" | ||
80 | R_PAREN@[84; 85) ")" | ||
81 | WHITESPACE@[85; 86) " " | ||
82 | EQ@[86; 87) "=" | ||
83 | WHITESPACE@[87; 88) " " | ||
84 | TUPLE_EXPR@[88; 90) | ||
85 | L_PAREN@[88; 89) "(" | ||
86 | R_PAREN@[89; 90) ")" | ||
87 | SEMI@[90; 91) ";" | ||
88 | WHITESPACE@[91; 92) "\n" | ||
89 | R_CURLY@[92; 93) "}" | ||
90 | WHITESPACE@[93; 94) "\n" | ||