diff options
-rw-r--r-- | src/grammar.ron | 5 | ||||
-rw-r--r-- | src/grammar/expressions/mod.rs | 56 | ||||
-rw-r--r-- | src/parser_api.rs | 4 | ||||
-rw-r--r-- | src/parser_impl/mod.rs | 6 | ||||
-rw-r--r-- | src/syntax_kinds/generated.rs | 14 | ||||
-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 |
18 files changed, 358 insertions, 346 deletions
diff --git a/src/grammar.ron b/src/grammar.ron index b525476c2..0620a8b8c 100644 --- a/src/grammar.ron +++ b/src/grammar.ron | |||
@@ -43,6 +43,10 @@ Grammar( | |||
43 | ["-=", "MINUSEQ"], | 43 | ["-=", "MINUSEQ"], |
44 | ["&&", "AMPAMP"], | 44 | ["&&", "AMPAMP"], |
45 | ["||", "PIPEPIPE"], | 45 | ["||", "PIPEPIPE"], |
46 | ["<<", "SHL"], | ||
47 | [">>", "SHR"], | ||
48 | ["<<=", "SHLEQ"], | ||
49 | [">>=", "SHREQ"], | ||
46 | ], | 50 | ], |
47 | keywords: [ | 51 | keywords: [ |
48 | "use", | 52 | "use", |
@@ -168,6 +172,7 @@ Grammar( | |||
168 | "REF_EXPR", | 172 | "REF_EXPR", |
169 | "DEREF_EXPR", | 173 | "DEREF_EXPR", |
170 | "NOT_EXPR", | 174 | "NOT_EXPR", |
175 | "NEG_EXPR", | ||
171 | 176 | ||
172 | "RANGE_EXPR", // just weird | 177 | "RANGE_EXPR", // just weird |
173 | "BIN_EXPR", | 178 | "BIN_EXPR", |
diff --git a/src/grammar/expressions/mod.rs b/src/grammar/expressions/mod.rs index c137fe654..5b7228146 100644 --- a/src/grammar/expressions/mod.rs +++ b/src/grammar/expressions/mod.rs | |||
@@ -3,7 +3,7 @@ mod atom; | |||
3 | use super::*; | 3 | use super::*; |
4 | pub(super) use self::atom::literal; | 4 | pub(super) use self::atom::literal; |
5 | 5 | ||
6 | const EXPR_FIRST: TokenSet = UNARY_EXPR_FIRST; | 6 | const EXPR_FIRST: TokenSet = LHS_FIRST; |
7 | 7 | ||
8 | pub(super) fn expr(p: &mut Parser) { | 8 | pub(super) fn expr(p: &mut Parser) { |
9 | let r = Restrictions { forbid_structs: false }; | 9 | let r = Restrictions { forbid_structs: false }; |
@@ -38,26 +38,6 @@ enum Op { | |||
38 | Composite(SyntaxKind, u8), | 38 | Composite(SyntaxKind, u8), |
39 | } | 39 | } |
40 | 40 | ||
41 | // test expr_binding_power | ||
42 | // fn foo() { | ||
43 | // 1 + 2 * 3 == 1 * 2 + 3; | ||
44 | // *x = 1 + 1; | ||
45 | // } | ||
46 | |||
47 | // test range_binding_power | ||
48 | // fn foo() { | ||
49 | // .. 1 + 1; | ||
50 | // .. z = 2; | ||
51 | // x = false .. 1 == 1; | ||
52 | // } | ||
53 | |||
54 | // test compound_ops | ||
55 | // fn foo() { | ||
56 | // x += 1; | ||
57 | // 1 + 1 <= 2 * 3; | ||
58 | // z -= 3 >= 0; | ||
59 | // true || true && false; | ||
60 | // } | ||
61 | fn current_op(p: &Parser) -> (u8, Op) { | 41 | fn current_op(p: &Parser) -> (u8, Op) { |
62 | if p.at_compound2(PLUS, EQ) { | 42 | if p.at_compound2(PLUS, EQ) { |
63 | return (1, Op::Composite(PLUSEQ, 2)); | 43 | return (1, Op::Composite(PLUSEQ, 2)); |
@@ -65,6 +45,12 @@ fn current_op(p: &Parser) -> (u8, Op) { | |||
65 | if p.at_compound2(MINUS, EQ) { | 45 | if p.at_compound2(MINUS, EQ) { |
66 | return (1, Op::Composite(MINUSEQ, 2)); | 46 | return (1, Op::Composite(MINUSEQ, 2)); |
67 | } | 47 | } |
48 | if p.at_compound3(L_ANGLE, L_ANGLE, EQ) { | ||
49 | return (1, Op::Composite(SHLEQ, 3)); | ||
50 | } | ||
51 | if p.at_compound3(R_ANGLE, R_ANGLE, EQ) { | ||
52 | return (1, Op::Composite(SHREQ, 3)); | ||
53 | } | ||
68 | if p.at_compound2(PIPE, PIPE) { | 54 | if p.at_compound2(PIPE, PIPE) { |
69 | return (3, Op::Composite(PIPEPIPE, 2)); | 55 | return (3, Op::Composite(PIPEPIPE, 2)); |
70 | } | 56 | } |
@@ -77,13 +63,22 @@ fn current_op(p: &Parser) -> (u8, Op) { | |||
77 | if p.at_compound2(R_ANGLE, EQ) { | 63 | if p.at_compound2(R_ANGLE, EQ) { |
78 | return (5, Op::Composite(GTEQ, 2)); | 64 | return (5, Op::Composite(GTEQ, 2)); |
79 | } | 65 | } |
66 | if p.at_compound2(L_ANGLE, L_ANGLE) { | ||
67 | return (9, Op::Composite(SHL, 2)); | ||
68 | } | ||
69 | if p.at_compound2(R_ANGLE, R_ANGLE) { | ||
70 | return (9, Op::Composite(SHR, 2)); | ||
71 | } | ||
80 | 72 | ||
81 | let bp = match p.current() { | 73 | let bp = match p.current() { |
82 | EQ => 1, | 74 | EQ => 1, |
83 | DOTDOT => 2, | 75 | DOTDOT => 2, |
84 | EQEQ | NEQ => 5, | 76 | EQEQ | NEQ => 5, |
85 | MINUS | PLUS => 6, | 77 | PIPE => 6, |
86 | STAR | SLASH => 7, | 78 | CARET => 7, |
79 | AMP => 8, | ||
80 | MINUS | PLUS => 10, | ||
81 | STAR | SLASH | PERCENT => 11, | ||
87 | _ => 0, | 82 | _ => 0, |
88 | }; | 83 | }; |
89 | (bp, Op::Simple) | 84 | (bp, Op::Simple) |
@@ -107,13 +102,13 @@ fn expr_bp(p: &mut Parser, r: Restrictions, bp: u8) { | |||
107 | p.bump_compound(kind, n); | 102 | p.bump_compound(kind, n); |
108 | } | 103 | } |
109 | } | 104 | } |
110 | lhs = bin_expr(p, r, lhs, op_bp); | 105 | lhs = bin_expr(p, r, lhs, op_bp + 1); |
111 | } | 106 | } |
112 | } | 107 | } |
113 | 108 | ||
114 | const UNARY_EXPR_FIRST: TokenSet = | 109 | const LHS_FIRST: TokenSet = |
115 | token_set_union![ | 110 | token_set_union![ |
116 | token_set![AMP, STAR, EXCL], | 111 | token_set![AMP, STAR, EXCL, DOTDOT, MINUS], |
117 | atom::ATOM_EXPR_FIRST, | 112 | atom::ATOM_EXPR_FIRST, |
118 | ]; | 113 | ]; |
119 | 114 | ||
@@ -149,6 +144,15 @@ fn lhs(p: &mut Parser, r: Restrictions) -> Option<CompletedMarker> { | |||
149 | p.bump(); | 144 | p.bump(); |
150 | NOT_EXPR | 145 | NOT_EXPR |
151 | } | 146 | } |
147 | // test neg_expr | ||
148 | // fn foo() { | ||
149 | // --1; | ||
150 | // } | ||
151 | MINUS => { | ||
152 | m = p.start(); | ||
153 | p.bump(); | ||
154 | NEG_EXPR | ||
155 | } | ||
152 | DOTDOT => { | 156 | DOTDOT => { |
153 | m = p.start(); | 157 | m = p.start(); |
154 | p.bump(); | 158 | p.bump(); |
diff --git a/src/parser_api.rs b/src/parser_api.rs index fef21c5fd..c739b1321 100644 --- a/src/parser_api.rs +++ b/src/parser_api.rs | |||
@@ -62,6 +62,10 @@ impl<'t> Parser<'t> { | |||
62 | self.0.at_compound2(c1, c2) | 62 | self.0.at_compound2(c1, c2) |
63 | } | 63 | } |
64 | 64 | ||
65 | pub(crate) fn at_compound3(&self, c1: SyntaxKind, c2: SyntaxKind, c3: SyntaxKind) -> bool { | ||
66 | self.0.at_compound3(c1, c2, c3) | ||
67 | } | ||
68 | |||
65 | /// Checks if the current token is contextual keyword with text `t`. | 69 | /// Checks if the current token is contextual keyword with text `t`. |
66 | pub(crate) fn at_contextual_kw(&self, t: &str) -> bool { | 70 | pub(crate) fn at_contextual_kw(&self, t: &str) -> bool { |
67 | self.0.at_kw(t) | 71 | self.0.at_kw(t) |
diff --git a/src/parser_impl/mod.rs b/src/parser_impl/mod.rs index d640a7784..06c16cdb4 100644 --- a/src/parser_impl/mod.rs +++ b/src/parser_impl/mod.rs | |||
@@ -70,6 +70,12 @@ impl<'t> ParserImpl<'t> { | |||
70 | && self.inp.start(self.pos + 1) == self.inp.start(self.pos) + self.inp.len(self.pos) | 70 | && self.inp.start(self.pos + 1) == self.inp.start(self.pos) + self.inp.len(self.pos) |
71 | } | 71 | } |
72 | 72 | ||
73 | pub(super) fn at_compound3(&self, c1: SyntaxKind, c2: SyntaxKind, c3: SyntaxKind) -> bool { | ||
74 | self.inp.kind(self.pos) == c1 && self.inp.kind(self.pos + 1) == c2 && self.inp.kind(self.pos + 2) == c3 | ||
75 | && self.inp.start(self.pos + 1) == self.inp.start(self.pos) + self.inp.len(self.pos) | ||
76 | && self.inp.start(self.pos + 2) == self.inp.start(self.pos + 1) + self.inp.len(self.pos + 1) | ||
77 | } | ||
78 | |||
73 | pub(super) fn nth(&self, n: u32) -> SyntaxKind { | 79 | pub(super) fn nth(&self, n: u32) -> SyntaxKind { |
74 | self.inp.kind(self.pos + n) | 80 | self.inp.kind(self.pos + n) |
75 | } | 81 | } |
diff --git a/src/syntax_kinds/generated.rs b/src/syntax_kinds/generated.rs index 005f4a9dc..db8c20004 100644 --- a/src/syntax_kinds/generated.rs +++ b/src/syntax_kinds/generated.rs | |||
@@ -46,6 +46,10 @@ pub enum SyntaxKind { | |||
46 | MINUSEQ, | 46 | MINUSEQ, |
47 | AMPAMP, | 47 | AMPAMP, |
48 | PIPEPIPE, | 48 | PIPEPIPE, |
49 | SHL, | ||
50 | SHR, | ||
51 | SHLEQ, | ||
52 | SHREQ, | ||
49 | USE_KW, | 53 | USE_KW, |
50 | FN_KW, | 54 | FN_KW, |
51 | STRUCT_KW, | 55 | STRUCT_KW, |
@@ -154,6 +158,7 @@ pub enum SyntaxKind { | |||
154 | REF_EXPR, | 158 | REF_EXPR, |
155 | DEREF_EXPR, | 159 | DEREF_EXPR, |
156 | NOT_EXPR, | 160 | NOT_EXPR, |
161 | NEG_EXPR, | ||
157 | RANGE_EXPR, | 162 | RANGE_EXPR, |
158 | BIN_EXPR, | 163 | BIN_EXPR, |
159 | EXTERN_BLOCK_EXPR, | 164 | EXTERN_BLOCK_EXPR, |
@@ -280,6 +285,10 @@ impl SyntaxKind { | |||
280 | MINUSEQ => &SyntaxInfo { name: "MINUSEQ" }, | 285 | MINUSEQ => &SyntaxInfo { name: "MINUSEQ" }, |
281 | AMPAMP => &SyntaxInfo { name: "AMPAMP" }, | 286 | AMPAMP => &SyntaxInfo { name: "AMPAMP" }, |
282 | PIPEPIPE => &SyntaxInfo { name: "PIPEPIPE" }, | 287 | PIPEPIPE => &SyntaxInfo { name: "PIPEPIPE" }, |
288 | SHL => &SyntaxInfo { name: "SHL" }, | ||
289 | SHR => &SyntaxInfo { name: "SHR" }, | ||
290 | SHLEQ => &SyntaxInfo { name: "SHLEQ" }, | ||
291 | SHREQ => &SyntaxInfo { name: "SHREQ" }, | ||
283 | USE_KW => &SyntaxInfo { name: "USE_KW" }, | 292 | USE_KW => &SyntaxInfo { name: "USE_KW" }, |
284 | FN_KW => &SyntaxInfo { name: "FN_KW" }, | 293 | FN_KW => &SyntaxInfo { name: "FN_KW" }, |
285 | STRUCT_KW => &SyntaxInfo { name: "STRUCT_KW" }, | 294 | STRUCT_KW => &SyntaxInfo { name: "STRUCT_KW" }, |
@@ -388,6 +397,7 @@ impl SyntaxKind { | |||
388 | REF_EXPR => &SyntaxInfo { name: "REF_EXPR" }, | 397 | REF_EXPR => &SyntaxInfo { name: "REF_EXPR" }, |
389 | DEREF_EXPR => &SyntaxInfo { name: "DEREF_EXPR" }, | 398 | DEREF_EXPR => &SyntaxInfo { name: "DEREF_EXPR" }, |
390 | NOT_EXPR => &SyntaxInfo { name: "NOT_EXPR" }, | 399 | NOT_EXPR => &SyntaxInfo { name: "NOT_EXPR" }, |
400 | NEG_EXPR => &SyntaxInfo { name: "NEG_EXPR" }, | ||
391 | RANGE_EXPR => &SyntaxInfo { name: "RANGE_EXPR" }, | 401 | RANGE_EXPR => &SyntaxInfo { name: "RANGE_EXPR" }, |
392 | BIN_EXPR => &SyntaxInfo { name: "BIN_EXPR" }, | 402 | BIN_EXPR => &SyntaxInfo { name: "BIN_EXPR" }, |
393 | EXTERN_BLOCK_EXPR => &SyntaxInfo { name: "EXTERN_BLOCK_EXPR" }, | 403 | EXTERN_BLOCK_EXPR => &SyntaxInfo { name: "EXTERN_BLOCK_EXPR" }, |
@@ -534,6 +544,10 @@ impl SyntaxKind { | |||
534 | MINUSEQ => "-=", | 544 | MINUSEQ => "-=", |
535 | AMPAMP => "&&", | 545 | AMPAMP => "&&", |
536 | PIPEPIPE => "||", | 546 | PIPEPIPE => "||", |
547 | SHL => "<<", | ||
548 | SHR => ">>", | ||
549 | SHLEQ => "<<=", | ||
550 | SHREQ => ">>=", | ||
537 | 551 | ||
538 | USE_KW => "use", | 552 | USE_KW => "use", |
539 | FN_KW => "fn", | 553 | FN_KW => "fn", |
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) | ||