diff options
author | Aleksey Kladov <[email protected]> | 2018-08-04 15:17:20 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-08-04 15:17:20 +0100 |
commit | e4b84fbf36d04e54f68f914f724c8e804233d3aa (patch) | |
tree | 3e38d49ae28b0600c8c17de9488e7de77d8f9cec /tests | |
parent | 82efdff34bf24680bef58eca399ec3f20748a96a (diff) |
Assignment expression
Diffstat (limited to 'tests')
-rw-r--r-- | tests/data/parser/inline/0074_expr_binding_power.rs | 3 | ||||
-rw-r--r-- | tests/data/parser/inline/0074_expr_binding_power.txt | 102 |
2 files changed, 65 insertions, 40 deletions
diff --git a/tests/data/parser/inline/0074_expr_binding_power.rs b/tests/data/parser/inline/0074_expr_binding_power.rs index db855fd02..87afb036e 100644 --- a/tests/data/parser/inline/0074_expr_binding_power.rs +++ b/tests/data/parser/inline/0074_expr_binding_power.rs | |||
@@ -1,3 +1,4 @@ | |||
1 | fn foo() { | 1 | fn foo() { |
2 | 1 + 2 * 3 == 1 * 2 + 3 | 2 | 1 + 2 * 3 == 1 * 2 + 3; |
3 | *x = 1 + 1; | ||
3 | } | 4 | } |
diff --git a/tests/data/parser/inline/0074_expr_binding_power.txt b/tests/data/parser/inline/0074_expr_binding_power.txt index 05aad25e9..384fd4354 100644 --- a/tests/data/parser/inline/0074_expr_binding_power.txt +++ b/tests/data/parser/inline/0074_expr_binding_power.txt | |||
@@ -1,5 +1,5 @@ | |||
1 | FILE@[0; 40) | 1 | FILE@[0; 57) |
2 | FN_ITEM@[0; 40) | 2 | FN_ITEM@[0; 57) |
3 | FN_KW@[0; 2) | 3 | FN_KW@[0; 2) |
4 | NAME@[2; 6) | 4 | NAME@[2; 6) |
5 | WHITESPACE@[2; 3) | 5 | WHITESPACE@[2; 3) |
@@ -8,41 +8,65 @@ FILE@[0; 40) | |||
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_EXPR@[9; 40) | 11 | BLOCK_EXPR@[9; 57) |
12 | L_CURLY@[9; 10) | 12 | L_CURLY@[9; 10) |
13 | BIN_EXPR@[10; 38) | 13 | EXPR_STMT@[10; 43) |
14 | BIN_EXPR@[10; 25) | 14 | BIN_EXPR@[10; 37) |
15 | LITERAL@[10; 17) | 15 | BIN_EXPR@[10; 25) |
16 | WHITESPACE@[10; 15) | 16 | LITERAL@[10; 17) |
17 | INT_NUMBER@[15; 16) "1" | 17 | WHITESPACE@[10; 15) |
18 | WHITESPACE@[16; 17) | 18 | INT_NUMBER@[15; 16) "1" |
19 | PLUS@[17; 18) | 19 | WHITESPACE@[16; 17) |
20 | BIN_EXPR@[18; 25) | 20 | PLUS@[17; 18) |
21 | LITERAL@[18; 21) | 21 | BIN_EXPR@[18; 25) |
22 | WHITESPACE@[18; 19) | 22 | LITERAL@[18; 21) |
23 | INT_NUMBER@[19; 20) "2" | 23 | WHITESPACE@[18; 19) |
24 | WHITESPACE@[20; 21) | 24 | INT_NUMBER@[19; 20) "2" |
25 | STAR@[21; 22) | 25 | WHITESPACE@[20; 21) |
26 | LITERAL@[22; 25) | 26 | STAR@[21; 22) |
27 | WHITESPACE@[22; 23) | 27 | LITERAL@[22; 25) |
28 | INT_NUMBER@[23; 24) "3" | 28 | WHITESPACE@[22; 23) |
29 | WHITESPACE@[24; 25) | 29 | INT_NUMBER@[23; 24) "3" |
30 | EQEQ@[25; 27) | 30 | WHITESPACE@[24; 25) |
31 | BIN_EXPR@[27; 38) | 31 | EQEQ@[25; 27) |
32 | BIN_EXPR@[27; 34) | 32 | BIN_EXPR@[27; 37) |
33 | LITERAL@[27; 30) | 33 | BIN_EXPR@[27; 34) |
34 | WHITESPACE@[27; 28) | 34 | LITERAL@[27; 30) |
35 | INT_NUMBER@[28; 29) "1" | 35 | WHITESPACE@[27; 28) |
36 | WHITESPACE@[29; 30) | 36 | INT_NUMBER@[28; 29) "1" |
37 | STAR@[30; 31) | 37 | WHITESPACE@[29; 30) |
38 | LITERAL@[31; 34) | 38 | STAR@[30; 31) |
39 | WHITESPACE@[31; 32) | 39 | LITERAL@[31; 34) |
40 | INT_NUMBER@[32; 33) "2" | 40 | WHITESPACE@[31; 32) |
41 | WHITESPACE@[33; 34) | 41 | INT_NUMBER@[32; 33) "2" |
42 | PLUS@[34; 35) | 42 | WHITESPACE@[33; 34) |
43 | LITERAL@[35; 38) | 43 | PLUS@[34; 35) |
44 | WHITESPACE@[35; 36) | 44 | LITERAL@[35; 37) |
45 | INT_NUMBER@[36; 37) "3" | 45 | WHITESPACE@[35; 36) |
46 | WHITESPACE@[37; 38) | 46 | INT_NUMBER@[36; 37) "3" |
47 | R_CURLY@[38; 39) | 47 | SEMI@[37; 38) |
48 | WHITESPACE@[39; 40) | 48 | WHITESPACE@[38; 43) |
49 | EXPR_STMT@[43; 55) | ||
50 | BIN_EXPR@[43; 53) | ||
51 | DEREF_EXPR@[43; 46) | ||
52 | STAR@[43; 44) | ||
53 | PATH_EXPR@[44; 46) | ||
54 | PATH@[44; 46) | ||
55 | PATH_SEGMENT@[44; 46) | ||
56 | NAME_REF@[44; 46) | ||
57 | IDENT@[44; 45) "x" | ||
58 | WHITESPACE@[45; 46) | ||
59 | EQ@[46; 47) | ||
60 | BIN_EXPR@[47; 53) | ||
61 | LITERAL@[47; 50) | ||
62 | WHITESPACE@[47; 48) | ||
63 | INT_NUMBER@[48; 49) "1" | ||
64 | WHITESPACE@[49; 50) | ||
65 | PLUS@[50; 51) | ||
66 | LITERAL@[51; 53) | ||
67 | WHITESPACE@[51; 52) | ||
68 | INT_NUMBER@[52; 53) "1" | ||
69 | SEMI@[53; 54) | ||
70 | WHITESPACE@[54; 55) | ||
71 | R_CURLY@[55; 56) | ||
72 | WHITESPACE@[56; 57) | ||