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/ok/0052_for_range_block.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/ok/0052_for_range_block.txt')
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0052_for_range_block.txt | 138 |
1 files changed, 70 insertions, 68 deletions
diff --git a/crates/ra_syntax/test_data/parser/ok/0052_for_range_block.txt b/crates/ra_syntax/test_data/parser/ok/0052_for_range_block.txt index 858f042c6..374c58670 100644 --- a/crates/ra_syntax/test_data/parser/ok/0052_for_range_block.txt +++ b/crates/ra_syntax/test_data/parser/ok/0052_for_range_block.txt | |||
@@ -8,72 +8,74 @@ SOURCE_FILE@[0; 80) | |||
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@[9; 79) | 11 | BLOCK_EXPR@[9; 79) |
12 | L_CURLY@[9; 10) "{" | 12 | BLOCK@[9; 79) |
13 | WHITESPACE@[10; 14) "\n " | 13 | L_CURLY@[9; 10) "{" |
14 | FOR_EXPR@[14; 77) | 14 | WHITESPACE@[10; 14) "\n " |
15 | FOR_KW@[14; 17) "for" | 15 | FOR_EXPR@[14; 77) |
16 | WHITESPACE@[17; 18) " " | 16 | FOR_KW@[14; 17) "for" |
17 | BIND_PAT@[18; 20) | 17 | WHITESPACE@[17; 18) " " |
18 | NAME@[18; 20) | 18 | BIND_PAT@[18; 20) |
19 | IDENT@[18; 20) "_x" | 19 | NAME@[18; 20) |
20 | WHITESPACE@[20; 21) " " | 20 | IDENT@[18; 20) "_x" |
21 | IN_KW@[21; 23) "in" | 21 | WHITESPACE@[20; 21) " " |
22 | WHITESPACE@[23; 24) " " | 22 | IN_KW@[21; 23) "in" |
23 | RANGE_EXPR@[24; 56) | 23 | WHITESPACE@[23; 24) " " |
24 | LITERAL@[24; 25) | 24 | RANGE_EXPR@[24; 56) |
25 | INT_NUMBER@[24; 25) "0" | 25 | LITERAL@[24; 25) |
26 | WHITESPACE@[25; 26) " " | 26 | INT_NUMBER@[24; 25) "0" |
27 | DOTDOT@[26; 28) ".." | 27 | WHITESPACE@[25; 26) " " |
28 | WHITESPACE@[28; 29) " " | 28 | DOTDOT@[26; 28) ".." |
29 | METHOD_CALL_EXPR@[29; 56) | 29 | WHITESPACE@[28; 29) " " |
30 | PAREN_EXPR@[29; 43) | 30 | METHOD_CALL_EXPR@[29; 56) |
31 | L_PAREN@[29; 30) "(" | 31 | PAREN_EXPR@[29; 43) |
32 | RANGE_EXPR@[30; 42) | 32 | L_PAREN@[29; 30) "(" |
33 | LITERAL@[30; 31) | 33 | RANGE_EXPR@[30; 42) |
34 | INT_NUMBER@[30; 31) "0" | 34 | LITERAL@[30; 31) |
35 | WHITESPACE@[31; 32) " " | 35 | INT_NUMBER@[30; 31) "0" |
36 | DOTDOT@[32; 34) ".." | 36 | WHITESPACE@[31; 32) " " |
37 | WHITESPACE@[34; 35) " " | 37 | DOTDOT@[32; 34) ".." |
38 | BLOCK_EXPR@[35; 42) | 38 | WHITESPACE@[34; 35) " " |
39 | BLOCK@[35; 42) | 39 | BLOCK_EXPR@[35; 42) |
40 | L_CURLY@[35; 36) "{" | 40 | BLOCK@[35; 42) |
41 | BIN_EXPR@[36; 41) | 41 | L_CURLY@[35; 36) "{" |
42 | LITERAL@[36; 37) | 42 | BIN_EXPR@[36; 41) |
43 | INT_NUMBER@[36; 37) "1" | 43 | LITERAL@[36; 37) |
44 | WHITESPACE@[37; 38) " " | 44 | INT_NUMBER@[36; 37) "1" |
45 | PLUS@[38; 39) "+" | 45 | WHITESPACE@[37; 38) " " |
46 | WHITESPACE@[39; 40) " " | 46 | PLUS@[38; 39) "+" |
47 | LITERAL@[40; 41) | 47 | WHITESPACE@[39; 40) " " |
48 | INT_NUMBER@[40; 41) "2" | 48 | LITERAL@[40; 41) |
49 | R_CURLY@[41; 42) "}" | 49 | INT_NUMBER@[40; 41) "2" |
50 | R_PAREN@[42; 43) ")" | 50 | R_CURLY@[41; 42) "}" |
51 | DOT@[43; 44) "." | 51 | R_PAREN@[42; 43) ")" |
52 | NAME_REF@[44; 47) | 52 | DOT@[43; 44) "." |
53 | IDENT@[44; 47) "sum" | 53 | NAME_REF@[44; 47) |
54 | TYPE_ARG_LIST@[47; 54) | 54 | IDENT@[44; 47) "sum" |
55 | COLONCOLON@[47; 49) "::" | 55 | TYPE_ARG_LIST@[47; 54) |
56 | L_ANGLE@[49; 50) "<" | 56 | COLONCOLON@[47; 49) "::" |
57 | TYPE_ARG@[50; 53) | 57 | L_ANGLE@[49; 50) "<" |
58 | PATH_TYPE@[50; 53) | 58 | TYPE_ARG@[50; 53) |
59 | PATH@[50; 53) | 59 | PATH_TYPE@[50; 53) |
60 | PATH_SEGMENT@[50; 53) | 60 | PATH@[50; 53) |
61 | NAME_REF@[50; 53) | 61 | PATH_SEGMENT@[50; 53) |
62 | IDENT@[50; 53) "u32" | 62 | NAME_REF@[50; 53) |
63 | R_ANGLE@[53; 54) ">" | 63 | IDENT@[50; 53) "u32" |
64 | ARG_LIST@[54; 56) | 64 | R_ANGLE@[53; 54) ">" |
65 | L_PAREN@[54; 55) "(" | 65 | ARG_LIST@[54; 56) |
66 | R_PAREN@[55; 56) ")" | 66 | L_PAREN@[54; 55) "(" |
67 | WHITESPACE@[56; 57) " " | 67 | R_PAREN@[55; 56) ")" |
68 | BLOCK@[57; 77) | 68 | WHITESPACE@[56; 57) " " |
69 | L_CURLY@[57; 58) "{" | 69 | BLOCK_EXPR@[57; 77) |
70 | WHITESPACE@[58; 66) "\n " | 70 | BLOCK@[57; 77) |
71 | EXPR_STMT@[66; 72) | 71 | L_CURLY@[57; 58) "{" |
72 | BREAK_EXPR@[66; 71) | 72 | WHITESPACE@[58; 66) "\n " |
73 | BREAK_KW@[66; 71) "break" | 73 | EXPR_STMT@[66; 72) |
74 | SEMI@[71; 72) ";" | 74 | BREAK_EXPR@[66; 71) |
75 | WHITESPACE@[72; 76) "\n " | 75 | BREAK_KW@[66; 71) "break" |
76 | R_CURLY@[76; 77) "}" | 76 | SEMI@[71; 72) ";" |
77 | WHITESPACE@[77; 78) "\n" | 77 | WHITESPACE@[72; 76) "\n " |
78 | R_CURLY@[78; 79) "}" | 78 | R_CURLY@[76; 77) "}" |
79 | WHITESPACE@[77; 78) "\n" | ||
80 | R_CURLY@[78; 79) "}" | ||
79 | WHITESPACE@[79; 80) "\n" | 81 | WHITESPACE@[79; 80) "\n" |