diff options
author | Aleksey Kladov <[email protected]> | 2018-08-07 12:24:03 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-08-07 12:24:03 +0100 |
commit | 8908e51aeaee91d6b63684a21ed1ca16de49916f (patch) | |
tree | 30fa7b9ac02c7326d3c7fbd192ebe2ef46b82d58 /tests | |
parent | 498098a5d968f06f08fa093f1fd5a43a9a61ecf3 (diff) |
full precedence
Diffstat (limited to 'tests')
-rw-r--r-- | tests/data/parser/inline/0074_expr_binding_power.rs | 4 | ||||
-rw-r--r-- | tests/data/parser/inline/0074_expr_binding_power.txt | 72 | ||||
-rw-r--r-- | tests/data/parser/inline/0079_compound_ops.txt | 72 | ||||
-rw-r--r-- | tests/data/parser/inline/0082_range_binding_power.rs | 5 | ||||
-rw-r--r-- | tests/data/parser/inline/0082_range_binding_power.txt | 72 | ||||
-rw-r--r-- | tests/data/parser/inline/0084_compound_ops.rs | 6 | ||||
-rw-r--r-- | tests/data/parser/inline/0084_compound_ops.txt | 89 | ||||
-rw-r--r-- | tests/data/parser/inline/0085_neg_expr.rs | 3 | ||||
-rw-r--r-- | tests/data/parser/inline/0085_neg_expr.txt | 24 | ||||
-rw-r--r-- | tests/data/parser/ok/0028_operator_binding_power.rs | 14 | ||||
-rw-r--r-- | tests/data/parser/ok/0028_operator_binding_power.txt | 185 | ||||
-rw-r--r-- | tests/data/parser/ok/0029_range_forms.rs | 5 | ||||
-rw-r--r-- | tests/data/parser/ok/0029_range_forms.txt | 68 |
13 files changed, 299 insertions, 320 deletions
diff --git a/tests/data/parser/inline/0074_expr_binding_power.rs b/tests/data/parser/inline/0074_expr_binding_power.rs deleted file mode 100644 index 87afb036e..000000000 --- a/tests/data/parser/inline/0074_expr_binding_power.rs +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | fn foo() { | ||
2 | 1 + 2 * 3 == 1 * 2 + 3; | ||
3 | *x = 1 + 1; | ||
4 | } | ||
diff --git a/tests/data/parser/inline/0074_expr_binding_power.txt b/tests/data/parser/inline/0074_expr_binding_power.txt deleted file mode 100644 index fc0831d18..000000000 --- a/tests/data/parser/inline/0074_expr_binding_power.txt +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | FILE@[0; 57) | ||
2 | FN_ITEM@[0; 56) | ||
3 | FN_KW@[0; 2) | ||
4 | WHITESPACE@[2; 3) | ||
5 | NAME@[3; 6) | ||
6 | IDENT@[3; 6) "foo" | ||
7 | PARAM_LIST@[6; 8) | ||
8 | L_PAREN@[6; 7) | ||
9 | R_PAREN@[7; 8) | ||
10 | WHITESPACE@[8; 9) | ||
11 | BLOCK_EXPR@[9; 56) | ||
12 | L_CURLY@[9; 10) | ||
13 | WHITESPACE@[10; 15) | ||
14 | EXPR_STMT@[15; 38) | ||
15 | BIN_EXPR@[15; 37) | ||
16 | BIN_EXPR@[15; 24) | ||
17 | LITERAL@[15; 16) | ||
18 | INT_NUMBER@[15; 16) "1" | ||
19 | WHITESPACE@[16; 17) | ||
20 | PLUS@[17; 18) | ||
21 | WHITESPACE@[18; 19) | ||
22 | BIN_EXPR@[19; 24) | ||
23 | LITERAL@[19; 20) | ||
24 | INT_NUMBER@[19; 20) "2" | ||
25 | WHITESPACE@[20; 21) | ||
26 | STAR@[21; 22) | ||
27 | WHITESPACE@[22; 23) | ||
28 | LITERAL@[23; 24) | ||
29 | INT_NUMBER@[23; 24) "3" | ||
30 | WHITESPACE@[24; 25) | ||
31 | EQEQ@[25; 27) | ||
32 | WHITESPACE@[27; 28) | ||
33 | BIN_EXPR@[28; 37) | ||
34 | BIN_EXPR@[28; 33) | ||
35 | LITERAL@[28; 29) | ||
36 | INT_NUMBER@[28; 29) "1" | ||
37 | WHITESPACE@[29; 30) | ||
38 | STAR@[30; 31) | ||
39 | WHITESPACE@[31; 32) | ||
40 | LITERAL@[32; 33) | ||
41 | INT_NUMBER@[32; 33) "2" | ||
42 | WHITESPACE@[33; 34) | ||
43 | PLUS@[34; 35) | ||
44 | WHITESPACE@[35; 36) | ||
45 | LITERAL@[36; 37) | ||
46 | INT_NUMBER@[36; 37) "3" | ||
47 | SEMI@[37; 38) | ||
48 | WHITESPACE@[38; 43) | ||
49 | EXPR_STMT@[43; 54) | ||
50 | BIN_EXPR@[43; 53) | ||
51 | DEREF_EXPR@[43; 45) | ||
52 | STAR@[43; 44) | ||
53 | PATH_EXPR@[44; 45) | ||
54 | PATH@[44; 45) | ||
55 | PATH_SEGMENT@[44; 45) | ||
56 | NAME_REF@[44; 45) | ||
57 | IDENT@[44; 45) "x" | ||
58 | WHITESPACE@[45; 46) | ||
59 | EQ@[46; 47) | ||
60 | WHITESPACE@[47; 48) | ||
61 | BIN_EXPR@[48; 53) | ||
62 | LITERAL@[48; 49) | ||
63 | INT_NUMBER@[48; 49) "1" | ||
64 | WHITESPACE@[49; 50) | ||
65 | PLUS@[50; 51) | ||
66 | WHITESPACE@[51; 52) | ||
67 | LITERAL@[52; 53) | ||
68 | INT_NUMBER@[52; 53) "1" | ||
69 | SEMI@[53; 54) | ||
70 | WHITESPACE@[54; 55) | ||
71 | R_CURLY@[55; 56) | ||
72 | WHITESPACE@[56; 57) | ||
diff --git a/tests/data/parser/inline/0079_compound_ops.txt b/tests/data/parser/inline/0079_compound_ops.txt deleted file mode 100644 index 6eaed8c75..000000000 --- a/tests/data/parser/inline/0079_compound_ops.txt +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | FILE@[0; 62) | ||
2 | FN_ITEM@[0; 62) | ||
3 | FN_KW@[0; 2) | ||
4 | NAME@[2; 6) | ||
5 | WHITESPACE@[2; 3) | ||
6 | IDENT@[3; 6) "foo" | ||
7 | PARAM_LIST@[6; 9) | ||
8 | L_PAREN@[6; 7) | ||
9 | R_PAREN@[7; 8) | ||
10 | WHITESPACE@[8; 9) | ||
11 | BLOCK_EXPR@[9; 62) | ||
12 | L_CURLY@[9; 10) | ||
13 | EXPR_STMT@[10; 27) | ||
14 | BIN_EXPR@[10; 21) | ||
15 | PATH_EXPR@[10; 17) | ||
16 | PATH@[10; 17) | ||
17 | PATH_SEGMENT@[10; 17) | ||
18 | NAME_REF@[10; 17) | ||
19 | WHITESPACE@[10; 15) | ||
20 | IDENT@[15; 16) "x" | ||
21 | WHITESPACE@[16; 17) | ||
22 | PLUSEQ@[17; 19) | ||
23 | LITERAL@[19; 21) | ||
24 | WHITESPACE@[19; 20) | ||
25 | INT_NUMBER@[20; 21) "1" | ||
26 | SEMI@[21; 22) | ||
27 | WHITESPACE@[22; 27) | ||
28 | EXPR_STMT@[27; 47) | ||
29 | BIN_EXPR@[27; 41) | ||
30 | BIN_EXPR@[27; 33) | ||
31 | LITERAL@[27; 29) | ||
32 | INT_NUMBER@[27; 28) "1" | ||
33 | WHITESPACE@[28; 29) | ||
34 | PLUS@[29; 30) | ||
35 | LITERAL@[30; 33) | ||
36 | WHITESPACE@[30; 31) | ||
37 | INT_NUMBER@[31; 32) "1" | ||
38 | WHITESPACE@[32; 33) | ||
39 | LTEQ@[33; 35) | ||
40 | BIN_EXPR@[35; 41) | ||
41 | LITERAL@[35; 38) | ||
42 | WHITESPACE@[35; 36) | ||
43 | INT_NUMBER@[36; 37) "2" | ||
44 | WHITESPACE@[37; 38) | ||
45 | STAR@[38; 39) | ||
46 | LITERAL@[39; 41) | ||
47 | WHITESPACE@[39; 40) | ||
48 | INT_NUMBER@[40; 41) "3" | ||
49 | SEMI@[41; 42) | ||
50 | WHITESPACE@[42; 47) | ||
51 | EXPR_STMT@[47; 60) | ||
52 | BIN_EXPR@[47; 58) | ||
53 | PATH_EXPR@[47; 49) | ||
54 | PATH@[47; 49) | ||
55 | PATH_SEGMENT@[47; 49) | ||
56 | NAME_REF@[47; 49) | ||
57 | IDENT@[47; 48) "z" | ||
58 | WHITESPACE@[48; 49) | ||
59 | MINUSEQ@[49; 51) | ||
60 | BIN_EXPR@[51; 58) | ||
61 | LITERAL@[51; 54) | ||
62 | WHITESPACE@[51; 52) | ||
63 | INT_NUMBER@[52; 53) "3" | ||
64 | WHITESPACE@[53; 54) | ||
65 | GTEQ@[54; 56) | ||
66 | LITERAL@[56; 58) | ||
67 | WHITESPACE@[56; 57) | ||
68 | INT_NUMBER@[57; 58) "0" | ||
69 | SEMI@[58; 59) | ||
70 | WHITESPACE@[59; 60) | ||
71 | R_CURLY@[60; 61) | ||
72 | WHITESPACE@[61; 62) | ||
diff --git a/tests/data/parser/inline/0082_range_binding_power.rs b/tests/data/parser/inline/0082_range_binding_power.rs deleted file mode 100644 index 259ec31e2..000000000 --- a/tests/data/parser/inline/0082_range_binding_power.rs +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | fn foo() { | ||
2 | .. 1 + 1; | ||
3 | .. z = 2; | ||
4 | x = false .. 1 == 1; | ||
5 | } | ||
diff --git a/tests/data/parser/inline/0082_range_binding_power.txt b/tests/data/parser/inline/0082_range_binding_power.txt deleted file mode 100644 index 72666d8f8..000000000 --- a/tests/data/parser/inline/0082_range_binding_power.txt +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | FILE@[0; 66) | ||
2 | FN_ITEM@[0; 65) | ||
3 | FN_KW@[0; 2) | ||
4 | WHITESPACE@[2; 3) | ||
5 | NAME@[3; 6) | ||
6 | IDENT@[3; 6) "foo" | ||
7 | PARAM_LIST@[6; 8) | ||
8 | L_PAREN@[6; 7) | ||
9 | R_PAREN@[7; 8) | ||
10 | WHITESPACE@[8; 9) | ||
11 | BLOCK_EXPR@[9; 65) | ||
12 | L_CURLY@[9; 10) | ||
13 | WHITESPACE@[10; 15) | ||
14 | EXPR_STMT@[15; 24) | ||
15 | RANGE_EXPR@[15; 23) | ||
16 | DOTDOT@[15; 17) | ||
17 | WHITESPACE@[17; 18) | ||
18 | BIN_EXPR@[18; 23) | ||
19 | LITERAL@[18; 19) | ||
20 | INT_NUMBER@[18; 19) "1" | ||
21 | WHITESPACE@[19; 20) | ||
22 | PLUS@[20; 21) | ||
23 | WHITESPACE@[21; 22) | ||
24 | LITERAL@[22; 23) | ||
25 | INT_NUMBER@[22; 23) "1" | ||
26 | SEMI@[23; 24) | ||
27 | WHITESPACE@[24; 29) | ||
28 | EXPR_STMT@[29; 38) | ||
29 | BIN_EXPR@[29; 37) | ||
30 | RANGE_EXPR@[29; 33) | ||
31 | DOTDOT@[29; 31) | ||
32 | WHITESPACE@[31; 32) | ||
33 | PATH_EXPR@[32; 33) | ||
34 | PATH@[32; 33) | ||
35 | PATH_SEGMENT@[32; 33) | ||
36 | NAME_REF@[32; 33) | ||
37 | IDENT@[32; 33) "z" | ||
38 | WHITESPACE@[33; 34) | ||
39 | EQ@[34; 35) | ||
40 | WHITESPACE@[35; 36) | ||
41 | LITERAL@[36; 37) | ||
42 | INT_NUMBER@[36; 37) "2" | ||
43 | SEMI@[37; 38) | ||
44 | WHITESPACE@[38; 43) | ||
45 | EXPR_STMT@[43; 63) | ||
46 | BIN_EXPR@[43; 62) | ||
47 | PATH_EXPR@[43; 44) | ||
48 | PATH@[43; 44) | ||
49 | PATH_SEGMENT@[43; 44) | ||
50 | NAME_REF@[43; 44) | ||
51 | IDENT@[43; 44) "x" | ||
52 | WHITESPACE@[44; 45) | ||
53 | EQ@[45; 46) | ||
54 | WHITESPACE@[46; 47) | ||
55 | BIN_EXPR@[47; 62) | ||
56 | LITERAL@[47; 52) | ||
57 | FALSE_KW@[47; 52) | ||
58 | WHITESPACE@[52; 53) | ||
59 | DOTDOT@[53; 55) | ||
60 | WHITESPACE@[55; 56) | ||
61 | BIN_EXPR@[56; 62) | ||
62 | LITERAL@[56; 57) | ||
63 | INT_NUMBER@[56; 57) "1" | ||
64 | WHITESPACE@[57; 58) | ||
65 | EQEQ@[58; 60) | ||
66 | WHITESPACE@[60; 61) | ||
67 | LITERAL@[61; 62) | ||
68 | INT_NUMBER@[61; 62) "1" | ||
69 | SEMI@[62; 63) | ||
70 | WHITESPACE@[63; 64) | ||
71 | R_CURLY@[64; 65) | ||
72 | WHITESPACE@[65; 66) | ||
diff --git a/tests/data/parser/inline/0084_compound_ops.rs b/tests/data/parser/inline/0084_compound_ops.rs deleted file mode 100644 index 04b1764f1..000000000 --- a/tests/data/parser/inline/0084_compound_ops.rs +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | fn foo() { | ||
2 | x += 1; | ||
3 | 1 + 1 <= 2 * 3; | ||
4 | z -= 3 >= 0; | ||
5 | true || true && false; | ||
6 | } | ||
diff --git a/tests/data/parser/inline/0084_compound_ops.txt b/tests/data/parser/inline/0084_compound_ops.txt deleted file mode 100644 index d51f638a2..000000000 --- a/tests/data/parser/inline/0084_compound_ops.txt +++ /dev/null | |||
@@ -1,89 +0,0 @@ | |||
1 | FILE@[0; 89) | ||
2 | FN_ITEM@[0; 88) | ||
3 | FN_KW@[0; 2) | ||
4 | WHITESPACE@[2; 3) | ||
5 | NAME@[3; 6) | ||
6 | IDENT@[3; 6) "foo" | ||
7 | PARAM_LIST@[6; 8) | ||
8 | L_PAREN@[6; 7) | ||
9 | R_PAREN@[7; 8) | ||
10 | WHITESPACE@[8; 9) | ||
11 | BLOCK_EXPR@[9; 88) | ||
12 | L_CURLY@[9; 10) | ||
13 | WHITESPACE@[10; 15) | ||
14 | EXPR_STMT@[15; 22) | ||
15 | BIN_EXPR@[15; 21) | ||
16 | PATH_EXPR@[15; 16) | ||
17 | PATH@[15; 16) | ||
18 | PATH_SEGMENT@[15; 16) | ||
19 | NAME_REF@[15; 16) | ||
20 | IDENT@[15; 16) "x" | ||
21 | WHITESPACE@[16; 17) | ||
22 | PLUSEQ@[17; 19) | ||
23 | WHITESPACE@[19; 20) | ||
24 | LITERAL@[20; 21) | ||
25 | INT_NUMBER@[20; 21) "1" | ||
26 | SEMI@[21; 22) | ||
27 | WHITESPACE@[22; 27) | ||
28 | EXPR_STMT@[27; 42) | ||
29 | BIN_EXPR@[27; 41) | ||
30 | BIN_EXPR@[27; 32) | ||
31 | LITERAL@[27; 28) | ||
32 | INT_NUMBER@[27; 28) "1" | ||
33 | WHITESPACE@[28; 29) | ||
34 | PLUS@[29; 30) | ||
35 | WHITESPACE@[30; 31) | ||
36 | LITERAL@[31; 32) | ||
37 | INT_NUMBER@[31; 32) "1" | ||
38 | WHITESPACE@[32; 33) | ||
39 | LTEQ@[33; 35) | ||
40 | WHITESPACE@[35; 36) | ||
41 | BIN_EXPR@[36; 41) | ||
42 | LITERAL@[36; 37) | ||
43 | INT_NUMBER@[36; 37) "2" | ||
44 | WHITESPACE@[37; 38) | ||
45 | STAR@[38; 39) | ||
46 | WHITESPACE@[39; 40) | ||
47 | LITERAL@[40; 41) | ||
48 | INT_NUMBER@[40; 41) "3" | ||
49 | SEMI@[41; 42) | ||
50 | WHITESPACE@[42; 47) | ||
51 | EXPR_STMT@[47; 59) | ||
52 | BIN_EXPR@[47; 58) | ||
53 | PATH_EXPR@[47; 48) | ||
54 | PATH@[47; 48) | ||
55 | PATH_SEGMENT@[47; 48) | ||
56 | NAME_REF@[47; 48) | ||
57 | IDENT@[47; 48) "z" | ||
58 | WHITESPACE@[48; 49) | ||
59 | MINUSEQ@[49; 51) | ||
60 | WHITESPACE@[51; 52) | ||
61 | BIN_EXPR@[52; 58) | ||
62 | LITERAL@[52; 53) | ||
63 | INT_NUMBER@[52; 53) "3" | ||
64 | WHITESPACE@[53; 54) | ||
65 | GTEQ@[54; 56) | ||
66 | WHITESPACE@[56; 57) | ||
67 | LITERAL@[57; 58) | ||
68 | INT_NUMBER@[57; 58) "0" | ||
69 | SEMI@[58; 59) | ||
70 | WHITESPACE@[59; 64) | ||
71 | EXPR_STMT@[64; 86) | ||
72 | BIN_EXPR@[64; 85) | ||
73 | LITERAL@[64; 68) | ||
74 | TRUE_KW@[64; 68) | ||
75 | WHITESPACE@[68; 69) | ||
76 | PIPEPIPE@[69; 71) | ||
77 | WHITESPACE@[71; 72) | ||
78 | BIN_EXPR@[72; 85) | ||
79 | LITERAL@[72; 76) | ||
80 | TRUE_KW@[72; 76) | ||
81 | WHITESPACE@[76; 77) | ||
82 | AMPAMP@[77; 79) | ||
83 | WHITESPACE@[79; 80) | ||
84 | LITERAL@[80; 85) | ||
85 | FALSE_KW@[80; 85) | ||
86 | SEMI@[85; 86) | ||
87 | WHITESPACE@[86; 87) | ||
88 | R_CURLY@[87; 88) | ||
89 | WHITESPACE@[88; 89) | ||
diff --git a/tests/data/parser/inline/0085_neg_expr.rs b/tests/data/parser/inline/0085_neg_expr.rs new file mode 100644 index 000000000..45149d222 --- /dev/null +++ b/tests/data/parser/inline/0085_neg_expr.rs | |||
@@ -0,0 +1,3 @@ | |||
1 | fn foo() { | ||
2 | --1; | ||
3 | } | ||
diff --git a/tests/data/parser/inline/0085_neg_expr.txt b/tests/data/parser/inline/0085_neg_expr.txt new file mode 100644 index 000000000..8eeb0b1e6 --- /dev/null +++ b/tests/data/parser/inline/0085_neg_expr.txt | |||
@@ -0,0 +1,24 @@ | |||
1 | FILE@[0; 22) | ||
2 | FN_ITEM@[0; 21) | ||
3 | FN_KW@[0; 2) | ||
4 | WHITESPACE@[2; 3) | ||
5 | NAME@[3; 6) | ||
6 | IDENT@[3; 6) "foo" | ||
7 | PARAM_LIST@[6; 8) | ||
8 | L_PAREN@[6; 7) | ||
9 | R_PAREN@[7; 8) | ||
10 | WHITESPACE@[8; 9) | ||
11 | BLOCK_EXPR@[9; 21) | ||
12 | L_CURLY@[9; 10) | ||
13 | WHITESPACE@[10; 15) | ||
14 | EXPR_STMT@[15; 19) | ||
15 | NEG_EXPR@[15; 18) | ||
16 | MINUS@[15; 16) | ||
17 | NEG_EXPR@[16; 18) | ||
18 | MINUS@[16; 17) | ||
19 | LITERAL@[17; 18) | ||
20 | INT_NUMBER@[17; 18) "1" | ||
21 | SEMI@[18; 19) | ||
22 | WHITESPACE@[19; 20) | ||
23 | R_CURLY@[20; 21) | ||
24 | WHITESPACE@[21; 22) | ||
diff --git a/tests/data/parser/ok/0028_operator_binding_power.rs b/tests/data/parser/ok/0028_operator_binding_power.rs new file mode 100644 index 000000000..cc9598470 --- /dev/null +++ b/tests/data/parser/ok/0028_operator_binding_power.rs | |||
@@ -0,0 +1,14 @@ | |||
1 | fn binding_power() { | ||
2 | let x = 1 + 2 * 3 % 4 - 5 / 6; | ||
3 | 1 + 2 * 3; | ||
4 | 1 << 2 + 3; | ||
5 | 1 & 2 >> 3; | ||
6 | 1 ^ 2 & 3; | ||
7 | 1 | 2 ^ 3; | ||
8 | 1 == 2 | 3; | ||
9 | 1 && 2 == 3; | ||
10 | //1 || 2 && 2; | ||
11 | //1 .. 2 || 3; | ||
12 | //1 = 2 .. 3; | ||
13 | //---&*1 - --2 * 9; | ||
14 | } | ||
diff --git a/tests/data/parser/ok/0028_operator_binding_power.txt b/tests/data/parser/ok/0028_operator_binding_power.txt new file mode 100644 index 000000000..2cabd289e --- /dev/null +++ b/tests/data/parser/ok/0028_operator_binding_power.txt | |||
@@ -0,0 +1,185 @@ | |||
1 | FILE@[0; 248) | ||
2 | FN_ITEM@[0; 247) | ||
3 | FN_KW@[0; 2) | ||
4 | WHITESPACE@[2; 3) | ||
5 | NAME@[3; 16) | ||
6 | IDENT@[3; 16) "binding_power" | ||
7 | PARAM_LIST@[16; 18) | ||
8 | L_PAREN@[16; 17) | ||
9 | R_PAREN@[17; 18) | ||
10 | WHITESPACE@[18; 19) | ||
11 | BLOCK_EXPR@[19; 247) | ||
12 | L_CURLY@[19; 20) | ||
13 | WHITESPACE@[20; 25) | ||
14 | LET_STMT@[25; 55) | ||
15 | LET_KW@[25; 28) | ||
16 | WHITESPACE@[28; 29) | ||
17 | BIND_PAT@[29; 30) | ||
18 | NAME@[29; 30) | ||
19 | IDENT@[29; 30) "x" | ||
20 | WHITESPACE@[30; 31) | ||
21 | EQ@[31; 32) | ||
22 | WHITESPACE@[32; 33) | ||
23 | BIN_EXPR@[33; 54) | ||
24 | BIN_EXPR@[33; 46) | ||
25 | LITERAL@[33; 34) | ||
26 | INT_NUMBER@[33; 34) "1" | ||
27 | WHITESPACE@[34; 35) | ||
28 | PLUS@[35; 36) | ||
29 | WHITESPACE@[36; 37) | ||
30 | BIN_EXPR@[37; 46) | ||
31 | BIN_EXPR@[37; 42) | ||
32 | LITERAL@[37; 38) | ||
33 | INT_NUMBER@[37; 38) "2" | ||
34 | WHITESPACE@[38; 39) | ||
35 | STAR@[39; 40) | ||
36 | WHITESPACE@[40; 41) | ||
37 | LITERAL@[41; 42) | ||
38 | INT_NUMBER@[41; 42) "3" | ||
39 | WHITESPACE@[42; 43) | ||
40 | PERCENT@[43; 44) | ||
41 | WHITESPACE@[44; 45) | ||
42 | LITERAL@[45; 46) | ||
43 | INT_NUMBER@[45; 46) "4" | ||
44 | WHITESPACE@[46; 47) | ||
45 | MINUS@[47; 48) | ||
46 | WHITESPACE@[48; 49) | ||
47 | BIN_EXPR@[49; 54) | ||
48 | LITERAL@[49; 50) | ||
49 | INT_NUMBER@[49; 50) "5" | ||
50 | WHITESPACE@[50; 51) | ||
51 | SLASH@[51; 52) | ||
52 | WHITESPACE@[52; 53) | ||
53 | LITERAL@[53; 54) | ||
54 | INT_NUMBER@[53; 54) "6" | ||
55 | SEMI@[54; 55) | ||
56 | WHITESPACE@[55; 60) | ||
57 | EXPR_STMT@[60; 70) | ||
58 | BIN_EXPR@[60; 69) | ||
59 | LITERAL@[60; 61) | ||
60 | INT_NUMBER@[60; 61) "1" | ||
61 | WHITESPACE@[61; 62) | ||
62 | PLUS@[62; 63) | ||
63 | WHITESPACE@[63; 64) | ||
64 | BIN_EXPR@[64; 69) | ||
65 | LITERAL@[64; 65) | ||
66 | INT_NUMBER@[64; 65) "2" | ||
67 | WHITESPACE@[65; 66) | ||
68 | STAR@[66; 67) | ||
69 | WHITESPACE@[67; 68) | ||
70 | LITERAL@[68; 69) | ||
71 | INT_NUMBER@[68; 69) "3" | ||
72 | SEMI@[69; 70) | ||
73 | WHITESPACE@[70; 75) | ||
74 | EXPR_STMT@[75; 86) | ||
75 | BIN_EXPR@[75; 85) | ||
76 | LITERAL@[75; 76) | ||
77 | INT_NUMBER@[75; 76) "1" | ||
78 | WHITESPACE@[76; 77) | ||
79 | SHL@[77; 79) | ||
80 | WHITESPACE@[79; 80) | ||
81 | BIN_EXPR@[80; 85) | ||
82 | LITERAL@[80; 81) | ||
83 | INT_NUMBER@[80; 81) "2" | ||
84 | WHITESPACE@[81; 82) | ||
85 | PLUS@[82; 83) | ||
86 | WHITESPACE@[83; 84) | ||
87 | LITERAL@[84; 85) | ||
88 | INT_NUMBER@[84; 85) "3" | ||
89 | SEMI@[85; 86) | ||
90 | WHITESPACE@[86; 91) | ||
91 | EXPR_STMT@[91; 102) | ||
92 | BIN_EXPR@[91; 101) | ||
93 | LITERAL@[91; 92) | ||
94 | INT_NUMBER@[91; 92) "1" | ||
95 | WHITESPACE@[92; 93) | ||
96 | AMP@[93; 94) | ||
97 | WHITESPACE@[94; 95) | ||
98 | BIN_EXPR@[95; 101) | ||
99 | LITERAL@[95; 96) | ||
100 | INT_NUMBER@[95; 96) "2" | ||
101 | WHITESPACE@[96; 97) | ||
102 | SHR@[97; 99) | ||
103 | WHITESPACE@[99; 100) | ||
104 | LITERAL@[100; 101) | ||
105 | INT_NUMBER@[100; 101) "3" | ||
106 | SEMI@[101; 102) | ||
107 | WHITESPACE@[102; 107) | ||
108 | EXPR_STMT@[107; 117) | ||
109 | BIN_EXPR@[107; 116) | ||
110 | LITERAL@[107; 108) | ||
111 | INT_NUMBER@[107; 108) "1" | ||
112 | WHITESPACE@[108; 109) | ||
113 | CARET@[109; 110) | ||
114 | WHITESPACE@[110; 111) | ||
115 | BIN_EXPR@[111; 116) | ||
116 | LITERAL@[111; 112) | ||
117 | INT_NUMBER@[111; 112) "2" | ||
118 | WHITESPACE@[112; 113) | ||
119 | AMP@[113; 114) | ||
120 | WHITESPACE@[114; 115) | ||
121 | LITERAL@[115; 116) | ||
122 | INT_NUMBER@[115; 116) "3" | ||
123 | SEMI@[116; 117) | ||
124 | WHITESPACE@[117; 122) | ||
125 | EXPR_STMT@[122; 132) | ||
126 | BIN_EXPR@[122; 131) | ||
127 | LITERAL@[122; 123) | ||
128 | INT_NUMBER@[122; 123) "1" | ||
129 | WHITESPACE@[123; 124) | ||
130 | PIPE@[124; 125) | ||
131 | WHITESPACE@[125; 126) | ||
132 | BIN_EXPR@[126; 131) | ||
133 | LITERAL@[126; 127) | ||
134 | INT_NUMBER@[126; 127) "2" | ||
135 | WHITESPACE@[127; 128) | ||
136 | CARET@[128; 129) | ||
137 | WHITESPACE@[129; 130) | ||
138 | LITERAL@[130; 131) | ||
139 | INT_NUMBER@[130; 131) "3" | ||
140 | SEMI@[131; 132) | ||
141 | WHITESPACE@[132; 137) | ||
142 | EXPR_STMT@[137; 148) | ||
143 | BIN_EXPR@[137; 147) | ||
144 | LITERAL@[137; 138) | ||
145 | INT_NUMBER@[137; 138) "1" | ||
146 | WHITESPACE@[138; 139) | ||
147 | EQEQ@[139; 141) | ||
148 | WHITESPACE@[141; 142) | ||
149 | BIN_EXPR@[142; 147) | ||
150 | LITERAL@[142; 143) | ||
151 | INT_NUMBER@[142; 143) "2" | ||
152 | WHITESPACE@[143; 144) | ||
153 | PIPE@[144; 145) | ||
154 | WHITESPACE@[145; 146) | ||
155 | LITERAL@[146; 147) | ||
156 | INT_NUMBER@[146; 147) "3" | ||
157 | SEMI@[147; 148) | ||
158 | WHITESPACE@[148; 153) | ||
159 | EXPR_STMT@[153; 165) | ||
160 | BIN_EXPR@[153; 164) | ||
161 | LITERAL@[153; 154) | ||
162 | INT_NUMBER@[153; 154) "1" | ||
163 | WHITESPACE@[154; 155) | ||
164 | AMPAMP@[155; 157) | ||
165 | WHITESPACE@[157; 158) | ||
166 | BIN_EXPR@[158; 164) | ||
167 | LITERAL@[158; 159) | ||
168 | INT_NUMBER@[158; 159) "2" | ||
169 | WHITESPACE@[159; 160) | ||
170 | EQEQ@[160; 162) | ||
171 | WHITESPACE@[162; 163) | ||
172 | LITERAL@[163; 164) | ||
173 | INT_NUMBER@[163; 164) "3" | ||
174 | SEMI@[164; 165) | ||
175 | WHITESPACE@[165; 170) | ||
176 | COMMENT@[170; 184) | ||
177 | WHITESPACE@[184; 189) | ||
178 | COMMENT@[189; 203) | ||
179 | WHITESPACE@[203; 208) | ||
180 | COMMENT@[208; 221) | ||
181 | WHITESPACE@[221; 226) | ||
182 | COMMENT@[226; 245) | ||
183 | WHITESPACE@[245; 246) | ||
184 | R_CURLY@[246; 247) | ||
185 | WHITESPACE@[247; 248) | ||
diff --git a/tests/data/parser/ok/0029_range_forms.rs b/tests/data/parser/ok/0029_range_forms.rs new file mode 100644 index 000000000..74de11a7e --- /dev/null +++ b/tests/data/parser/ok/0029_range_forms.rs | |||
@@ -0,0 +1,5 @@ | |||
1 | fn foo() { | ||
2 | ..1 + 1; | ||
3 | ..z = 2; | ||
4 | x = false..1 == 1; | ||
5 | } | ||
diff --git a/tests/data/parser/ok/0029_range_forms.txt b/tests/data/parser/ok/0029_range_forms.txt new file mode 100644 index 000000000..8599f7dfc --- /dev/null +++ b/tests/data/parser/ok/0029_range_forms.txt | |||
@@ -0,0 +1,68 @@ | |||
1 | FILE@[0; 62) | ||
2 | FN_ITEM@[0; 61) | ||
3 | FN_KW@[0; 2) | ||
4 | WHITESPACE@[2; 3) | ||
5 | NAME@[3; 6) | ||
6 | IDENT@[3; 6) "foo" | ||
7 | PARAM_LIST@[6; 8) | ||
8 | L_PAREN@[6; 7) | ||
9 | R_PAREN@[7; 8) | ||
10 | WHITESPACE@[8; 9) | ||
11 | BLOCK_EXPR@[9; 61) | ||
12 | L_CURLY@[9; 10) | ||
13 | WHITESPACE@[10; 15) | ||
14 | EXPR_STMT@[15; 23) | ||
15 | RANGE_EXPR@[15; 22) | ||
16 | DOTDOT@[15; 17) | ||
17 | BIN_EXPR@[17; 22) | ||
18 | LITERAL@[17; 18) | ||
19 | INT_NUMBER@[17; 18) "1" | ||
20 | WHITESPACE@[18; 19) | ||
21 | PLUS@[19; 20) | ||
22 | WHITESPACE@[20; 21) | ||
23 | LITERAL@[21; 22) | ||
24 | INT_NUMBER@[21; 22) "1" | ||
25 | SEMI@[22; 23) | ||
26 | WHITESPACE@[23; 28) | ||
27 | EXPR_STMT@[28; 36) | ||
28 | BIN_EXPR@[28; 35) | ||
29 | RANGE_EXPR@[28; 31) | ||
30 | DOTDOT@[28; 30) | ||
31 | PATH_EXPR@[30; 31) | ||
32 | PATH@[30; 31) | ||
33 | PATH_SEGMENT@[30; 31) | ||
34 | NAME_REF@[30; 31) | ||
35 | IDENT@[30; 31) "z" | ||
36 | WHITESPACE@[31; 32) | ||
37 | EQ@[32; 33) | ||
38 | WHITESPACE@[33; 34) | ||
39 | LITERAL@[34; 35) | ||
40 | INT_NUMBER@[34; 35) "2" | ||
41 | SEMI@[35; 36) | ||
42 | WHITESPACE@[36; 41) | ||
43 | EXPR_STMT@[41; 59) | ||
44 | BIN_EXPR@[41; 58) | ||
45 | PATH_EXPR@[41; 42) | ||
46 | PATH@[41; 42) | ||
47 | PATH_SEGMENT@[41; 42) | ||
48 | NAME_REF@[41; 42) | ||
49 | IDENT@[41; 42) "x" | ||
50 | WHITESPACE@[42; 43) | ||
51 | EQ@[43; 44) | ||
52 | WHITESPACE@[44; 45) | ||
53 | BIN_EXPR@[45; 58) | ||
54 | LITERAL@[45; 50) | ||
55 | FALSE_KW@[45; 50) | ||
56 | DOTDOT@[50; 52) | ||
57 | BIN_EXPR@[52; 58) | ||
58 | LITERAL@[52; 53) | ||
59 | INT_NUMBER@[52; 53) "1" | ||
60 | WHITESPACE@[53; 54) | ||
61 | EQEQ@[54; 56) | ||
62 | WHITESPACE@[56; 57) | ||
63 | LITERAL@[57; 58) | ||
64 | INT_NUMBER@[57; 58) "1" | ||
65 | SEMI@[58; 59) | ||
66 | WHITESPACE@[59; 60) | ||
67 | R_CURLY@[60; 61) | ||
68 | WHITESPACE@[61; 62) | ||