diff options
Diffstat (limited to 'crates/ra_syntax/test_data/parser/ok')
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0059_loops_in_parens.rs | 5 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0059_loops_in_parens.txt | 101 |
2 files changed, 106 insertions, 0 deletions
diff --git a/crates/ra_syntax/test_data/parser/ok/0059_loops_in_parens.rs b/crates/ra_syntax/test_data/parser/ok/0059_loops_in_parens.rs new file mode 100644 index 000000000..6e8b718aa --- /dev/null +++ b/crates/ra_syntax/test_data/parser/ok/0059_loops_in_parens.rs | |||
@@ -0,0 +1,5 @@ | |||
1 | fn main() { | ||
2 | Some(for _ in [1].into_iter() {}); | ||
3 | Some(loop { break; }); | ||
4 | Some(while true {}); | ||
5 | } | ||
diff --git a/crates/ra_syntax/test_data/parser/ok/0059_loops_in_parens.txt b/crates/ra_syntax/test_data/parser/ok/0059_loops_in_parens.txt new file mode 100644 index 000000000..c011187ea --- /dev/null +++ b/crates/ra_syntax/test_data/parser/ok/0059_loops_in_parens.txt | |||
@@ -0,0 +1,101 @@ | |||
1 | SOURCE_FILE@[0; 105) | ||
2 | FN_DEF@[0; 104) | ||
3 | FN_KW@[0; 2) "fn" | ||
4 | WHITESPACE@[2; 3) " " | ||
5 | NAME@[3; 7) | ||
6 | IDENT@[3; 7) "main" | ||
7 | PARAM_LIST@[7; 9) | ||
8 | L_PAREN@[7; 8) "(" | ||
9 | R_PAREN@[8; 9) ")" | ||
10 | WHITESPACE@[9; 10) " " | ||
11 | BLOCK_EXPR@[10; 104) | ||
12 | BLOCK@[10; 104) | ||
13 | L_CURLY@[10; 11) "{" | ||
14 | WHITESPACE@[11; 16) "\n " | ||
15 | EXPR_STMT@[16; 50) | ||
16 | CALL_EXPR@[16; 49) | ||
17 | PATH_EXPR@[16; 20) | ||
18 | PATH@[16; 20) | ||
19 | PATH_SEGMENT@[16; 20) | ||
20 | NAME_REF@[16; 20) | ||
21 | IDENT@[16; 20) "Some" | ||
22 | ARG_LIST@[20; 49) | ||
23 | L_PAREN@[20; 21) "(" | ||
24 | FOR_EXPR@[21; 48) | ||
25 | FOR_KW@[21; 24) "for" | ||
26 | WHITESPACE@[24; 25) " " | ||
27 | PLACEHOLDER_PAT@[25; 26) | ||
28 | UNDERSCORE@[25; 26) "_" | ||
29 | WHITESPACE@[26; 27) " " | ||
30 | IN_KW@[27; 29) "in" | ||
31 | WHITESPACE@[29; 30) " " | ||
32 | METHOD_CALL_EXPR@[30; 45) | ||
33 | ARRAY_EXPR@[30; 33) | ||
34 | L_BRACK@[30; 31) "[" | ||
35 | LITERAL@[31; 32) | ||
36 | INT_NUMBER@[31; 32) "1" | ||
37 | R_BRACK@[32; 33) "]" | ||
38 | DOT@[33; 34) "." | ||
39 | NAME_REF@[34; 43) | ||
40 | IDENT@[34; 43) "into_iter" | ||
41 | ARG_LIST@[43; 45) | ||
42 | L_PAREN@[43; 44) "(" | ||
43 | R_PAREN@[44; 45) ")" | ||
44 | WHITESPACE@[45; 46) " " | ||
45 | BLOCK_EXPR@[46; 48) | ||
46 | BLOCK@[46; 48) | ||
47 | L_CURLY@[46; 47) "{" | ||
48 | R_CURLY@[47; 48) "}" | ||
49 | R_PAREN@[48; 49) ")" | ||
50 | SEMI@[49; 50) ";" | ||
51 | WHITESPACE@[50; 55) "\n " | ||
52 | EXPR_STMT@[55; 77) | ||
53 | CALL_EXPR@[55; 76) | ||
54 | PATH_EXPR@[55; 59) | ||
55 | PATH@[55; 59) | ||
56 | PATH_SEGMENT@[55; 59) | ||
57 | NAME_REF@[55; 59) | ||
58 | IDENT@[55; 59) "Some" | ||
59 | ARG_LIST@[59; 76) | ||
60 | L_PAREN@[59; 60) "(" | ||
61 | LOOP_EXPR@[60; 75) | ||
62 | LOOP_KW@[60; 64) "loop" | ||
63 | WHITESPACE@[64; 65) " " | ||
64 | BLOCK_EXPR@[65; 75) | ||
65 | BLOCK@[65; 75) | ||
66 | L_CURLY@[65; 66) "{" | ||
67 | WHITESPACE@[66; 67) " " | ||
68 | EXPR_STMT@[67; 73) | ||
69 | BREAK_EXPR@[67; 72) | ||
70 | BREAK_KW@[67; 72) "break" | ||
71 | SEMI@[72; 73) ";" | ||
72 | WHITESPACE@[73; 74) " " | ||
73 | R_CURLY@[74; 75) "}" | ||
74 | R_PAREN@[75; 76) ")" | ||
75 | SEMI@[76; 77) ";" | ||
76 | WHITESPACE@[77; 82) "\n " | ||
77 | EXPR_STMT@[82; 102) | ||
78 | CALL_EXPR@[82; 101) | ||
79 | PATH_EXPR@[82; 86) | ||
80 | PATH@[82; 86) | ||
81 | PATH_SEGMENT@[82; 86) | ||
82 | NAME_REF@[82; 86) | ||
83 | IDENT@[82; 86) "Some" | ||
84 | ARG_LIST@[86; 101) | ||
85 | L_PAREN@[86; 87) "(" | ||
86 | WHILE_EXPR@[87; 100) | ||
87 | WHILE_KW@[87; 92) "while" | ||
88 | WHITESPACE@[92; 93) " " | ||
89 | CONDITION@[93; 97) | ||
90 | LITERAL@[93; 97) | ||
91 | TRUE_KW@[93; 97) "true" | ||
92 | WHITESPACE@[97; 98) " " | ||
93 | BLOCK_EXPR@[98; 100) | ||
94 | BLOCK@[98; 100) | ||
95 | L_CURLY@[98; 99) "{" | ||
96 | R_CURLY@[99; 100) "}" | ||
97 | R_PAREN@[100; 101) ")" | ||
98 | SEMI@[101; 102) ";" | ||
99 | WHITESPACE@[102; 103) "\n" | ||
100 | R_CURLY@[103; 104) "}" | ||
101 | WHITESPACE@[104; 105) "\n" | ||