diff options
author | Edwin Cheng <[email protected]> | 2020-02-28 05:08:47 +0000 |
---|---|---|
committer | Edwin Cheng <[email protected]> | 2020-02-28 05:08:47 +0000 |
commit | f4e48ad3e45ac5cc4dbbf7919296e576e39a1bb9 (patch) | |
tree | 425c4e6acacd67705b65797e6233ccc1f237bb83 /crates/ra_syntax/test_data/parser/inline/ok | |
parent | e0c6e106d9909f34f1b8bbf2b18dee6ece47aa91 (diff) |
Parse attr in rhs of let stmts
Diffstat (limited to 'crates/ra_syntax/test_data/parser/inline/ok')
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0130_let_stmt.rs | 1 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0130_let_stmt.txt | 41 |
2 files changed, 35 insertions, 7 deletions
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0130_let_stmt.rs b/crates/ra_syntax/test_data/parser/inline/ok/0130_let_stmt.rs index 86803fe08..fa8ee49a2 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0130_let_stmt.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0130_let_stmt.rs | |||
@@ -5,4 +5,5 @@ fn foo() { | |||
5 | let d: i32 = 92; | 5 | let d: i32 = 92; |
6 | let e: !; | 6 | let e: !; |
7 | let _: ! = {}; | 7 | let _: ! = {}; |
8 | let f = #[attr]||{}; | ||
8 | } | 9 | } |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0130_let_stmt.txt b/crates/ra_syntax/test_data/parser/inline/ok/0130_let_stmt.txt index 97166cfd5..17739dfbd 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0130_let_stmt.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0130_let_stmt.txt | |||
@@ -1,5 +1,5 @@ | |||
1 | SOURCE_FILE@[0; 110) | 1 | SOURCE_FILE@[0; 135) |
2 | FN_DEF@[0; 109) | 2 | FN_DEF@[0; 134) |
3 | FN_KW@[0; 2) "fn" | 3 | FN_KW@[0; 2) "fn" |
4 | WHITESPACE@[2; 3) " " | 4 | WHITESPACE@[2; 3) " " |
5 | NAME@[3; 6) | 5 | NAME@[3; 6) |
@@ -8,8 +8,8 @@ SOURCE_FILE@[0; 110) | |||
8 | L_PAREN@[6; 7) "(" | 8 | L_PAREN@[6; 7) "(" |
9 | R_PAREN@[7; 8) ")" | 9 | R_PAREN@[7; 8) ")" |
10 | WHITESPACE@[8; 9) " " | 10 | WHITESPACE@[8; 9) " " |
11 | BLOCK_EXPR@[9; 109) | 11 | BLOCK_EXPR@[9; 134) |
12 | BLOCK@[9; 109) | 12 | BLOCK@[9; 134) |
13 | L_CURLY@[9; 10) "{" | 13 | L_CURLY@[9; 10) "{" |
14 | WHITESPACE@[10; 15) "\n " | 14 | WHITESPACE@[10; 15) "\n " |
15 | LET_STMT@[15; 21) | 15 | LET_STMT@[15; 21) |
@@ -97,6 +97,33 @@ SOURCE_FILE@[0; 110) | |||
97 | L_CURLY@[104; 105) "{" | 97 | L_CURLY@[104; 105) "{" |
98 | R_CURLY@[105; 106) "}" | 98 | R_CURLY@[105; 106) "}" |
99 | SEMI@[106; 107) ";" | 99 | SEMI@[106; 107) ";" |
100 | WHITESPACE@[107; 108) "\n" | 100 | WHITESPACE@[107; 112) "\n " |
101 | R_CURLY@[108; 109) "}" | 101 | LET_STMT@[112; 132) |
102 | WHITESPACE@[109; 110) "\n" | 102 | LET_KW@[112; 115) "let" |
103 | WHITESPACE@[115; 116) " " | ||
104 | BIND_PAT@[116; 117) | ||
105 | NAME@[116; 117) | ||
106 | IDENT@[116; 117) "f" | ||
107 | WHITESPACE@[117; 118) " " | ||
108 | EQ@[118; 119) "=" | ||
109 | WHITESPACE@[119; 120) " " | ||
110 | LAMBDA_EXPR@[120; 131) | ||
111 | ATTR@[120; 127) | ||
112 | POUND@[120; 121) "#" | ||
113 | L_BRACK@[121; 122) "[" | ||
114 | PATH@[122; 126) | ||
115 | PATH_SEGMENT@[122; 126) | ||
116 | NAME_REF@[122; 126) | ||
117 | IDENT@[122; 126) "attr" | ||
118 | R_BRACK@[126; 127) "]" | ||
119 | PARAM_LIST@[127; 129) | ||
120 | PIPE@[127; 128) "|" | ||
121 | PIPE@[128; 129) "|" | ||
122 | BLOCK_EXPR@[129; 131) | ||
123 | BLOCK@[129; 131) | ||
124 | L_CURLY@[129; 130) "{" | ||
125 | R_CURLY@[130; 131) "}" | ||
126 | SEMI@[131; 132) ";" | ||
127 | WHITESPACE@[132; 133) "\n" | ||
128 | R_CURLY@[133; 134) "}" | ||
129 | WHITESPACE@[134; 135) "\n" | ||