diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-09-02 20:20:24 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2019-09-02 20:20:24 +0100 |
commit | 7faec1c30046769d4ae490e15cf5405bcfbdeef8 (patch) | |
tree | 6d268b721027a5350928a6c5a0ec227b5fde8ebc /crates/ra_syntax/test_data/parser/err/0031_block_inner_attrs.txt | |
parent | a8397deab914240aca8f015fb3736689919c0a5b (diff) | |
parent | e94587e3153b52684fd3f6b82c8e7efc09ff5c8d (diff) |
Merge #1752
1752: Always wrap blocks into block expressions r=flodiebold a=matklad
This way, things like function bodies are expressions, and we don't have to single them out
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_syntax/test_data/parser/err/0031_block_inner_attrs.txt')
-rw-r--r-- | crates/ra_syntax/test_data/parser/err/0031_block_inner_attrs.txt | 201 |
1 files changed, 102 insertions, 99 deletions
diff --git a/crates/ra_syntax/test_data/parser/err/0031_block_inner_attrs.txt b/crates/ra_syntax/test_data/parser/err/0031_block_inner_attrs.txt index c205cf147..f67325b76 100644 --- a/crates/ra_syntax/test_data/parser/err/0031_block_inner_attrs.txt +++ b/crates/ra_syntax/test_data/parser/err/0031_block_inner_attrs.txt | |||
@@ -8,105 +8,108 @@ SOURCE_FILE@[0; 350) | |||
8 | L_PAREN@[8; 9) "(" | 8 | L_PAREN@[8; 9) "(" |
9 | R_PAREN@[9; 10) ")" | 9 | R_PAREN@[9; 10) ")" |
10 | WHITESPACE@[10; 11) " " | 10 | WHITESPACE@[10; 11) " " |
11 | BLOCK@[11; 349) | 11 | BLOCK_EXPR@[11; 349) |
12 | L_CURLY@[11; 12) "{" | 12 | BLOCK@[11; 349) |
13 | WHITESPACE@[12; 17) "\n " | 13 | L_CURLY@[11; 12) "{" |
14 | LET_STMT@[17; 129) | 14 | WHITESPACE@[12; 17) "\n " |
15 | LET_KW@[17; 20) "let" | 15 | LET_STMT@[17; 129) |
16 | WHITESPACE@[20; 21) " " | 16 | LET_KW@[17; 20) "let" |
17 | BIND_PAT@[21; 26) | 17 | WHITESPACE@[20; 21) " " |
18 | NAME@[21; 26) | 18 | BIND_PAT@[21; 26) |
19 | IDENT@[21; 26) "inner" | 19 | NAME@[21; 26) |
20 | WHITESPACE@[26; 27) " " | 20 | IDENT@[21; 26) "inner" |
21 | EQ@[27; 28) "=" | 21 | WHITESPACE@[26; 27) " " |
22 | WHITESPACE@[28; 29) " " | 22 | EQ@[27; 28) "=" |
23 | BLOCK_EXPR@[29; 128) | 23 | WHITESPACE@[28; 29) " " |
24 | BLOCK@[29; 128) | 24 | BLOCK_EXPR@[29; 128) |
25 | L_CURLY@[29; 30) "{" | 25 | BLOCK@[29; 128) |
26 | WHITESPACE@[30; 39) "\n " | 26 | L_CURLY@[29; 30) "{" |
27 | ATTR@[39; 83) | 27 | WHITESPACE@[30; 39) "\n " |
28 | POUND@[39; 40) "#" | 28 | ATTR@[39; 83) |
29 | EXCL@[40; 41) "!" | 29 | POUND@[39; 40) "#" |
30 | TOKEN_TREE@[41; 83) | 30 | EXCL@[40; 41) "!" |
31 | L_BRACK@[41; 42) "[" | 31 | TOKEN_TREE@[41; 83) |
32 | IDENT@[42; 45) "doc" | 32 | L_BRACK@[41; 42) "[" |
33 | TOKEN_TREE@[45; 82) | 33 | IDENT@[42; 45) "doc" |
34 | L_PAREN@[45; 46) "(" | 34 | TOKEN_TREE@[45; 82) |
35 | STRING@[46; 81) "\"Inner attributes not ..." | 35 | L_PAREN@[45; 46) "(" |
36 | R_PAREN@[81; 82) ")" | 36 | STRING@[46; 81) "\"Inner attributes not ..." |
37 | R_BRACK@[82; 83) "]" | 37 | R_PAREN@[81; 82) ")" |
38 | WHITESPACE@[83; 92) "\n " | 38 | R_BRACK@[82; 83) "]" |
39 | COMMENT@[92; 122) "//! Nor are ModuleDoc ..." | 39 | WHITESPACE@[83; 92) "\n " |
40 | WHITESPACE@[122; 127) "\n " | 40 | COMMENT@[92; 122) "//! Nor are ModuleDoc ..." |
41 | R_CURLY@[127; 128) "}" | 41 | WHITESPACE@[122; 127) "\n " |
42 | SEMI@[128; 129) ";" | 42 | R_CURLY@[127; 128) "}" |
43 | WHITESPACE@[129; 134) "\n " | 43 | SEMI@[128; 129) ";" |
44 | EXPR_STMT@[134; 257) | 44 | WHITESPACE@[129; 134) "\n " |
45 | IF_EXPR@[134; 257) | 45 | EXPR_STMT@[134; 257) |
46 | IF_KW@[134; 136) "if" | 46 | IF_EXPR@[134; 257) |
47 | WHITESPACE@[136; 137) " " | 47 | IF_KW@[134; 136) "if" |
48 | CONDITION@[137; 141) | 48 | WHITESPACE@[136; 137) " " |
49 | LITERAL@[137; 141) | 49 | CONDITION@[137; 141) |
50 | TRUE_KW@[137; 141) "true" | 50 | LITERAL@[137; 141) |
51 | WHITESPACE@[141; 142) " " | 51 | TRUE_KW@[137; 141) "true" |
52 | BLOCK@[142; 257) | 52 | WHITESPACE@[141; 142) " " |
53 | L_CURLY@[142; 143) "{" | 53 | BLOCK_EXPR@[142; 257) |
54 | WHITESPACE@[143; 152) "\n " | 54 | BLOCK@[142; 257) |
55 | ATTR@[152; 171) | 55 | L_CURLY@[142; 143) "{" |
56 | POUND@[152; 153) "#" | 56 | WHITESPACE@[143; 152) "\n " |
57 | EXCL@[153; 154) "!" | 57 | ATTR@[152; 171) |
58 | TOKEN_TREE@[154; 171) | 58 | POUND@[152; 153) "#" |
59 | L_BRACK@[154; 155) "[" | 59 | EXCL@[153; 154) "!" |
60 | IDENT@[155; 158) "doc" | 60 | TOKEN_TREE@[154; 171) |
61 | TOKEN_TREE@[158; 170) | 61 | L_BRACK@[154; 155) "[" |
62 | L_PAREN@[158; 159) "(" | 62 | IDENT@[155; 158) "doc" |
63 | STRING@[159; 169) "\"Nor here\"" | 63 | TOKEN_TREE@[158; 170) |
64 | R_PAREN@[169; 170) ")" | 64 | L_PAREN@[158; 159) "(" |
65 | R_BRACK@[170; 171) "]" | 65 | STRING@[159; 169) "\"Nor here\"" |
66 | WHITESPACE@[171; 180) "\n " | 66 | R_PAREN@[169; 170) ")" |
67 | ATTR@[180; 212) | 67 | R_BRACK@[170; 171) "]" |
68 | POUND@[180; 181) "#" | 68 | WHITESPACE@[171; 180) "\n " |
69 | EXCL@[181; 182) "!" | 69 | ATTR@[180; 212) |
70 | TOKEN_TREE@[182; 212) | 70 | POUND@[180; 181) "#" |
71 | L_BRACK@[182; 183) "[" | 71 | EXCL@[181; 182) "!" |
72 | IDENT@[183; 186) "doc" | 72 | TOKEN_TREE@[182; 212) |
73 | TOKEN_TREE@[186; 211) | 73 | L_BRACK@[182; 183) "[" |
74 | L_PAREN@[186; 187) "(" | 74 | IDENT@[183; 186) "doc" |
75 | STRING@[187; 210) "\"We error on each attr\"" | 75 | TOKEN_TREE@[186; 211) |
76 | R_PAREN@[210; 211) ")" | 76 | L_PAREN@[186; 187) "(" |
77 | R_BRACK@[211; 212) "]" | 77 | STRING@[187; 210) "\"We error on each attr\"" |
78 | WHITESPACE@[212; 221) "\n " | 78 | R_PAREN@[210; 211) ")" |
79 | COMMENT@[221; 251) "//! Nor are ModuleDoc ..." | 79 | R_BRACK@[211; 212) "]" |
80 | WHITESPACE@[251; 256) "\n " | 80 | WHITESPACE@[212; 221) "\n " |
81 | R_CURLY@[256; 257) "}" | 81 | COMMENT@[221; 251) "//! Nor are ModuleDoc ..." |
82 | WHITESPACE@[257; 262) "\n " | 82 | WHITESPACE@[251; 256) "\n " |
83 | WHILE_EXPR@[262; 347) | 83 | R_CURLY@[256; 257) "}" |
84 | WHILE_KW@[262; 267) "while" | 84 | WHITESPACE@[257; 262) "\n " |
85 | WHITESPACE@[267; 268) " " | 85 | WHILE_EXPR@[262; 347) |
86 | CONDITION@[268; 272) | 86 | WHILE_KW@[262; 267) "while" |
87 | LITERAL@[268; 272) | 87 | WHITESPACE@[267; 268) " " |
88 | TRUE_KW@[268; 272) "true" | 88 | CONDITION@[268; 272) |
89 | WHITESPACE@[272; 273) " " | 89 | LITERAL@[268; 272) |
90 | BLOCK@[273; 347) | 90 | TRUE_KW@[268; 272) "true" |
91 | L_CURLY@[273; 274) "{" | 91 | WHITESPACE@[272; 273) " " |
92 | WHITESPACE@[274; 283) "\n " | 92 | BLOCK_EXPR@[273; 347) |
93 | ATTR@[283; 302) | 93 | BLOCK@[273; 347) |
94 | POUND@[283; 284) "#" | 94 | L_CURLY@[273; 274) "{" |
95 | EXCL@[284; 285) "!" | 95 | WHITESPACE@[274; 283) "\n " |
96 | TOKEN_TREE@[285; 302) | 96 | ATTR@[283; 302) |
97 | L_BRACK@[285; 286) "[" | 97 | POUND@[283; 284) "#" |
98 | IDENT@[286; 289) "doc" | 98 | EXCL@[284; 285) "!" |
99 | TOKEN_TREE@[289; 301) | 99 | TOKEN_TREE@[285; 302) |
100 | L_PAREN@[289; 290) "(" | 100 | L_BRACK@[285; 286) "[" |
101 | STRING@[290; 300) "\"Nor here\"" | 101 | IDENT@[286; 289) "doc" |
102 | R_PAREN@[300; 301) ")" | 102 | TOKEN_TREE@[289; 301) |
103 | R_BRACK@[301; 302) "]" | 103 | L_PAREN@[289; 290) "(" |
104 | WHITESPACE@[302; 311) "\n " | 104 | STRING@[290; 300) "\"Nor here\"" |
105 | COMMENT@[311; 341) "//! Nor are ModuleDoc ..." | 105 | R_PAREN@[300; 301) ")" |
106 | WHITESPACE@[341; 346) "\n " | 106 | R_BRACK@[301; 302) "]" |
107 | R_CURLY@[346; 347) "}" | 107 | WHITESPACE@[302; 311) "\n " |
108 | WHITESPACE@[347; 348) "\n" | 108 | COMMENT@[311; 341) "//! Nor are ModuleDoc ..." |
109 | R_CURLY@[348; 349) "}" | 109 | WHITESPACE@[341; 346) "\n " |
110 | R_CURLY@[346; 347) "}" | ||
111 | WHITESPACE@[347; 348) "\n" | ||
112 | R_CURLY@[348; 349) "}" | ||
110 | WHITESPACE@[349; 350) "\n" | 113 | WHITESPACE@[349; 350) "\n" |
111 | error [39; 83): A block in this position cannot accept inner attributes | 114 | error [39; 83): A block in this position cannot accept inner attributes |
112 | error [152; 171): A block in this position cannot accept inner attributes | 115 | error [152; 171): A block in this position cannot accept inner attributes |