diff options
Diffstat (limited to 'crates/ra_syntax/test_data/parser/ok')
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0024_const_item.rs | 1 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0024_const_item.txt | 94 |
2 files changed, 57 insertions, 38 deletions
diff --git a/crates/ra_syntax/test_data/parser/ok/0024_const_item.rs b/crates/ra_syntax/test_data/parser/ok/0024_const_item.rs index 7446859b5..a806a209d 100644 --- a/crates/ra_syntax/test_data/parser/ok/0024_const_item.rs +++ b/crates/ra_syntax/test_data/parser/ok/0024_const_item.rs | |||
@@ -1,2 +1,3 @@ | |||
1 | const _: u32 = 0; | ||
1 | const FOO: u32 = 92; | 2 | const FOO: u32 = 92; |
2 | const mut BAR: u32 = 62; | 3 | const mut BAR: u32 = 62; |
diff --git a/crates/ra_syntax/test_data/parser/ok/0024_const_item.txt b/crates/ra_syntax/test_data/parser/ok/0024_const_item.txt index dea8a3a97..abe9f851b 100644 --- a/crates/ra_syntax/test_data/parser/ok/0024_const_item.txt +++ b/crates/ra_syntax/test_data/parser/ok/0024_const_item.txt | |||
@@ -1,41 +1,59 @@ | |||
1 | SOURCE_FILE@[0; 46) | 1 | SOURCE_FILE@[0; 64) |
2 | CONST_DEF@[0; 20) | 2 | CONST_DEF@[0; 17) |
3 | CONST_KW@[0; 5) "const" | 3 | CONST_KW@[0; 5) "const" |
4 | WHITESPACE@[5; 6) " " | 4 | WHITESPACE@[5; 6) " " |
5 | NAME@[6; 9) | 5 | UNDERSCORE@[6; 7) "_" |
6 | IDENT@[6; 9) "FOO" | 6 | COLON@[7; 8) ":" |
7 | COLON@[9; 10) ":" | 7 | WHITESPACE@[8; 9) " " |
8 | WHITESPACE@[10; 11) " " | 8 | PATH_TYPE@[9; 12) |
9 | PATH_TYPE@[11; 14) | 9 | PATH@[9; 12) |
10 | PATH@[11; 14) | 10 | PATH_SEGMENT@[9; 12) |
11 | PATH_SEGMENT@[11; 14) | 11 | NAME_REF@[9; 12) |
12 | NAME_REF@[11; 14) | 12 | IDENT@[9; 12) "u32" |
13 | IDENT@[11; 14) "u32" | 13 | WHITESPACE@[12; 13) " " |
14 | EQ@[13; 14) "=" | ||
14 | WHITESPACE@[14; 15) " " | 15 | WHITESPACE@[14; 15) " " |
15 | EQ@[15; 16) "=" | 16 | LITERAL@[15; 16) |
16 | WHITESPACE@[16; 17) " " | 17 | INT_NUMBER@[15; 16) "0" |
17 | LITERAL@[17; 19) | 18 | SEMI@[16; 17) ";" |
18 | INT_NUMBER@[17; 19) "92" | 19 | WHITESPACE@[17; 18) "\n" |
19 | SEMI@[19; 20) ";" | 20 | CONST_DEF@[18; 38) |
20 | WHITESPACE@[20; 21) "\n" | 21 | CONST_KW@[18; 23) "const" |
21 | CONST_DEF@[21; 45) | 22 | WHITESPACE@[23; 24) " " |
22 | CONST_KW@[21; 26) "const" | 23 | NAME@[24; 27) |
23 | WHITESPACE@[26; 27) " " | 24 | IDENT@[24; 27) "FOO" |
24 | MUT_KW@[27; 30) "mut" | 25 | COLON@[27; 28) ":" |
25 | WHITESPACE@[30; 31) " " | 26 | WHITESPACE@[28; 29) " " |
26 | NAME@[31; 34) | 27 | PATH_TYPE@[29; 32) |
27 | IDENT@[31; 34) "BAR" | 28 | PATH@[29; 32) |
28 | COLON@[34; 35) ":" | 29 | PATH_SEGMENT@[29; 32) |
29 | WHITESPACE@[35; 36) " " | 30 | NAME_REF@[29; 32) |
30 | PATH_TYPE@[36; 39) | 31 | IDENT@[29; 32) "u32" |
31 | PATH@[36; 39) | 32 | WHITESPACE@[32; 33) " " |
32 | PATH_SEGMENT@[36; 39) | 33 | EQ@[33; 34) "=" |
33 | NAME_REF@[36; 39) | 34 | WHITESPACE@[34; 35) " " |
34 | IDENT@[36; 39) "u32" | 35 | LITERAL@[35; 37) |
35 | WHITESPACE@[39; 40) " " | 36 | INT_NUMBER@[35; 37) "92" |
36 | EQ@[40; 41) "=" | 37 | SEMI@[37; 38) ";" |
37 | WHITESPACE@[41; 42) " " | 38 | WHITESPACE@[38; 39) "\n" |
38 | LITERAL@[42; 44) | 39 | CONST_DEF@[39; 63) |
39 | INT_NUMBER@[42; 44) "62" | 40 | CONST_KW@[39; 44) "const" |
40 | SEMI@[44; 45) ";" | 41 | WHITESPACE@[44; 45) " " |
41 | WHITESPACE@[45; 46) "\n" | 42 | MUT_KW@[45; 48) "mut" |
43 | WHITESPACE@[48; 49) " " | ||
44 | NAME@[49; 52) | ||
45 | IDENT@[49; 52) "BAR" | ||
46 | COLON@[52; 53) ":" | ||
47 | WHITESPACE@[53; 54) " " | ||
48 | PATH_TYPE@[54; 57) | ||
49 | PATH@[54; 57) | ||
50 | PATH_SEGMENT@[54; 57) | ||
51 | NAME_REF@[54; 57) | ||
52 | IDENT@[54; 57) "u32" | ||
53 | WHITESPACE@[57; 58) " " | ||
54 | EQ@[58; 59) "=" | ||
55 | WHITESPACE@[59; 60) " " | ||
56 | LITERAL@[60; 62) | ||
57 | INT_NUMBER@[60; 62) "62" | ||
58 | SEMI@[62; 63) ";" | ||
59 | WHITESPACE@[63; 64) "\n" | ||