diff options
author | Aleksey Kladov <[email protected]> | 2018-08-05 16:18:02 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-08-05 16:18:02 +0100 |
commit | d44169ab1e2897a90f8aa7d7672d2fe318cceb27 (patch) | |
tree | d8e52bfeeda6fcd3d2cbc0624c4f188449c32543 | |
parent | 720861bcff4b9f67ca4def66e2996015811fa90b (diff) |
ampersand -> amp
-rw-r--r-- | src/grammar.ron | 4 | ||||
-rw-r--r-- | src/grammar/expressions/mod.rs | 8 | ||||
-rw-r--r-- | src/grammar/params.rs | 8 | ||||
-rw-r--r-- | src/grammar/patterns.rs | 4 | ||||
-rw-r--r-- | src/grammar/types.rs | 4 | ||||
-rw-r--r-- | src/syntax_kinds/generated.rs | 14 | ||||
-rw-r--r-- | tests/data/lexer/0005_symbols.txt | 2 | ||||
-rw-r--r-- | tests/data/parser/inline/0026_reference_type;.txt | 6 | ||||
-rw-r--r-- | tests/data/parser/inline/0035_ref_pat.txt | 4 | ||||
-rw-r--r-- | tests/data/parser/inline/0044_ref_expr.txt | 6 | ||||
-rw-r--r-- | tests/data/parser/inline/0054_impl_item_items.txt | 2 | ||||
-rw-r--r-- | tests/data/parser/inline/0055_self_param.txt | 6 | ||||
-rw-r--r-- | tests/data/parser/inline/0062_deref_expr.txt | 2 | ||||
-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/0084_loop_expr.rs | 3 | ||||
-rw-r--r-- | tests/data/parser/inline/0084_loop_expr.txt | 24 |
17 files changed, 157 insertions, 35 deletions
diff --git a/src/grammar.ron b/src/grammar.ron index d5bdb206c..df769bba6 100644 --- a/src/grammar.ron +++ b/src/grammar.ron | |||
@@ -15,7 +15,7 @@ Grammar( | |||
15 | ["~", "TILDE"], | 15 | ["~", "TILDE"], |
16 | ["?", "QUESTION"], | 16 | ["?", "QUESTION"], |
17 | ["$", "DOLLAR"], | 17 | ["$", "DOLLAR"], |
18 | ["&", "AMPERSAND"], | 18 | ["&", "AMP"], |
19 | ["|", "PIPE"], | 19 | ["|", "PIPE"], |
20 | ["+", "PLUS"], | 20 | ["+", "PLUS"], |
21 | ["*", "STAR"], | 21 | ["*", "STAR"], |
@@ -41,7 +41,7 @@ Grammar( | |||
41 | [">=", "GTEQ"], | 41 | [">=", "GTEQ"], |
42 | ["+=", "PLUSEQ"], | 42 | ["+=", "PLUSEQ"], |
43 | ["-=", "MINUSEQ"], | 43 | ["-=", "MINUSEQ"], |
44 | ["&&", "AMPERSANDAMPERSAND"], | 44 | ["&&", "AMPAMP"], |
45 | ["||", "PIPEPIPE"], | 45 | ["||", "PIPEPIPE"], |
46 | ], | 46 | ], |
47 | keywords: [ | 47 | keywords: [ |
diff --git a/src/grammar/expressions/mod.rs b/src/grammar/expressions/mod.rs index 18e3f5798..e0b4ced74 100644 --- a/src/grammar/expressions/mod.rs +++ b/src/grammar/expressions/mod.rs | |||
@@ -68,8 +68,8 @@ fn current_op(p: &Parser) -> (u8, Op) { | |||
68 | if p.at_compound2(PIPE, PIPE) { | 68 | if p.at_compound2(PIPE, PIPE) { |
69 | return (3, Op::Composite(PIPEPIPE, 2)); | 69 | return (3, Op::Composite(PIPEPIPE, 2)); |
70 | } | 70 | } |
71 | if p.at_compound2(AMPERSAND, AMPERSAND) { | 71 | if p.at_compound2(AMP, AMP) { |
72 | return (4, Op::Composite(AMPERSANDAMPERSAND, 2)); | 72 | return (4, Op::Composite(AMPAMP, 2)); |
73 | } | 73 | } |
74 | if p.at_compound2(L_ANGLE, EQ) { | 74 | if p.at_compound2(L_ANGLE, EQ) { |
75 | return (5, Op::Composite(LTEQ, 2)); | 75 | return (5, Op::Composite(LTEQ, 2)); |
@@ -113,7 +113,7 @@ fn expr_bp(p: &mut Parser, r: Restrictions, bp: u8) { | |||
113 | 113 | ||
114 | const UNARY_EXPR_FIRST: TokenSet = | 114 | const UNARY_EXPR_FIRST: TokenSet = |
115 | token_set_union![ | 115 | token_set_union![ |
116 | token_set![AMPERSAND, STAR, EXCL], | 116 | token_set![AMP, STAR, EXCL], |
117 | atom::ATOM_EXPR_FIRST, | 117 | atom::ATOM_EXPR_FIRST, |
118 | ]; | 118 | ]; |
119 | 119 | ||
@@ -125,7 +125,7 @@ fn lhs(p: &mut Parser, r: Restrictions) -> Option<CompletedMarker> { | |||
125 | // let _ = &1; | 125 | // let _ = &1; |
126 | // let _ = &mut &f(); | 126 | // let _ = &mut &f(); |
127 | // } | 127 | // } |
128 | AMPERSAND => { | 128 | AMP => { |
129 | m = p.start(); | 129 | m = p.start(); |
130 | p.bump(); | 130 | p.bump(); |
131 | p.eat(MUT_KW); | 131 | p.eat(MUT_KW); |
diff --git a/src/grammar/params.rs b/src/grammar/params.rs index be985c80f..034542df1 100644 --- a/src/grammar/params.rs +++ b/src/grammar/params.rs | |||
@@ -53,10 +53,10 @@ fn self_param(p: &mut Parser) { | |||
53 | let la3 = p.nth(3); | 53 | let la3 = p.nth(3); |
54 | let n_toks = match (p.current(), la1, la2, la3) { | 54 | let n_toks = match (p.current(), la1, la2, la3) { |
55 | (SELF_KW, _, _, _) => 1, | 55 | (SELF_KW, _, _, _) => 1, |
56 | (AMPERSAND, SELF_KW, _, _) => 2, | 56 | (AMP, SELF_KW, _, _) => 2, |
57 | (AMPERSAND, MUT_KW, SELF_KW, _) => 3, | 57 | (AMP, MUT_KW, SELF_KW, _) => 3, |
58 | (AMPERSAND, LIFETIME, SELF_KW, _) => 3, | 58 | (AMP, LIFETIME, SELF_KW, _) => 3, |
59 | (AMPERSAND, LIFETIME, MUT_KW, SELF_KW) => 4, | 59 | (AMP, LIFETIME, MUT_KW, SELF_KW) => 4, |
60 | _ => return, | 60 | _ => return, |
61 | }; | 61 | }; |
62 | let m = p.start(); | 62 | let m = p.start(); |
diff --git a/src/grammar/patterns.rs b/src/grammar/patterns.rs index 770274686..d67f180fa 100644 --- a/src/grammar/patterns.rs +++ b/src/grammar/patterns.rs | |||
@@ -15,7 +15,7 @@ pub(super) fn pattern(p: &mut Parser) { | |||
15 | 15 | ||
16 | match la0 { | 16 | match la0 { |
17 | UNDERSCORE => placeholder_pat(p), | 17 | UNDERSCORE => placeholder_pat(p), |
18 | AMPERSAND => ref_pat(p), | 18 | AMP => ref_pat(p), |
19 | _ => p.err_and_bump("expected pattern"), | 19 | _ => p.err_and_bump("expected pattern"), |
20 | } | 20 | } |
21 | } | 21 | } |
@@ -108,7 +108,7 @@ fn placeholder_pat(p: &mut Parser) { | |||
108 | // let &mut b = (); | 108 | // let &mut b = (); |
109 | // } | 109 | // } |
110 | fn ref_pat(p: &mut Parser) { | 110 | fn ref_pat(p: &mut Parser) { |
111 | assert!(p.at(AMPERSAND)); | 111 | assert!(p.at(AMP)); |
112 | let m = p.start(); | 112 | let m = p.start(); |
113 | p.bump(); | 113 | p.bump(); |
114 | p.eat(MUT_KW); | 114 | p.eat(MUT_KW); |
diff --git a/src/grammar/types.rs b/src/grammar/types.rs index 565037cb0..9e63c9b2a 100644 --- a/src/grammar/types.rs +++ b/src/grammar/types.rs | |||
@@ -6,7 +6,7 @@ pub(super) fn type_(p: &mut Parser) { | |||
6 | EXCL => never_type(p), | 6 | EXCL => never_type(p), |
7 | STAR => pointer_type(p), | 7 | STAR => pointer_type(p), |
8 | L_BRACK => array_or_slice_type(p), | 8 | L_BRACK => array_or_slice_type(p), |
9 | AMPERSAND => reference_type(p), | 9 | AMP => reference_type(p), |
10 | UNDERSCORE => placeholder_type(p), | 10 | UNDERSCORE => placeholder_type(p), |
11 | FN_KW | UNSAFE_KW | EXTERN_KW => fn_pointer_type(p), | 11 | FN_KW | UNSAFE_KW | EXTERN_KW => fn_pointer_type(p), |
12 | FOR_KW => for_type(p), | 12 | FOR_KW => for_type(p), |
@@ -130,7 +130,7 @@ fn array_or_slice_type(p: &mut Parser) { | |||
130 | // type B = &'static (); | 130 | // type B = &'static (); |
131 | // type C = &mut (); | 131 | // type C = &mut (); |
132 | fn reference_type(p: &mut Parser) { | 132 | fn reference_type(p: &mut Parser) { |
133 | assert!(p.at(AMPERSAND)); | 133 | assert!(p.at(AMP)); |
134 | let m = p.start(); | 134 | let m = p.start(); |
135 | p.bump(); | 135 | p.bump(); |
136 | p.eat(LIFETIME); | 136 | p.eat(LIFETIME); |
diff --git a/src/syntax_kinds/generated.rs b/src/syntax_kinds/generated.rs index 20f01c505..1bce34443 100644 --- a/src/syntax_kinds/generated.rs +++ b/src/syntax_kinds/generated.rs | |||
@@ -20,7 +20,7 @@ pub enum SyntaxKind { | |||
20 | TILDE, | 20 | TILDE, |
21 | QUESTION, | 21 | QUESTION, |
22 | DOLLAR, | 22 | DOLLAR, |
23 | AMPERSAND, | 23 | AMP, |
24 | PIPE, | 24 | PIPE, |
25 | PLUS, | 25 | PLUS, |
26 | STAR, | 26 | STAR, |
@@ -44,7 +44,7 @@ pub enum SyntaxKind { | |||
44 | GTEQ, | 44 | GTEQ, |
45 | PLUSEQ, | 45 | PLUSEQ, |
46 | MINUSEQ, | 46 | MINUSEQ, |
47 | AMPERSANDAMPERSAND, | 47 | AMPAMP, |
48 | PIPEPIPE, | 48 | PIPEPIPE, |
49 | USE_KW, | 49 | USE_KW, |
50 | FN_KW, | 50 | FN_KW, |
@@ -251,7 +251,7 @@ impl SyntaxKind { | |||
251 | TILDE => &SyntaxInfo { name: "TILDE" }, | 251 | TILDE => &SyntaxInfo { name: "TILDE" }, |
252 | QUESTION => &SyntaxInfo { name: "QUESTION" }, | 252 | QUESTION => &SyntaxInfo { name: "QUESTION" }, |
253 | DOLLAR => &SyntaxInfo { name: "DOLLAR" }, | 253 | DOLLAR => &SyntaxInfo { name: "DOLLAR" }, |
254 | AMPERSAND => &SyntaxInfo { name: "AMPERSAND" }, | 254 | AMP => &SyntaxInfo { name: "AMP" }, |
255 | PIPE => &SyntaxInfo { name: "PIPE" }, | 255 | PIPE => &SyntaxInfo { name: "PIPE" }, |
256 | PLUS => &SyntaxInfo { name: "PLUS" }, | 256 | PLUS => &SyntaxInfo { name: "PLUS" }, |
257 | STAR => &SyntaxInfo { name: "STAR" }, | 257 | STAR => &SyntaxInfo { name: "STAR" }, |
@@ -275,7 +275,7 @@ impl SyntaxKind { | |||
275 | GTEQ => &SyntaxInfo { name: "GTEQ" }, | 275 | GTEQ => &SyntaxInfo { name: "GTEQ" }, |
276 | PLUSEQ => &SyntaxInfo { name: "PLUSEQ" }, | 276 | PLUSEQ => &SyntaxInfo { name: "PLUSEQ" }, |
277 | MINUSEQ => &SyntaxInfo { name: "MINUSEQ" }, | 277 | MINUSEQ => &SyntaxInfo { name: "MINUSEQ" }, |
278 | AMPERSANDAMPERSAND => &SyntaxInfo { name: "AMPERSANDAMPERSAND" }, | 278 | AMPAMP => &SyntaxInfo { name: "AMPAMP" }, |
279 | PIPEPIPE => &SyntaxInfo { name: "PIPEPIPE" }, | 279 | PIPEPIPE => &SyntaxInfo { name: "PIPEPIPE" }, |
280 | USE_KW => &SyntaxInfo { name: "USE_KW" }, | 280 | USE_KW => &SyntaxInfo { name: "USE_KW" }, |
281 | FN_KW => &SyntaxInfo { name: "FN_KW" }, | 281 | FN_KW => &SyntaxInfo { name: "FN_KW" }, |
@@ -473,7 +473,7 @@ impl SyntaxKind { | |||
473 | '~' => TILDE, | 473 | '~' => TILDE, |
474 | '?' => QUESTION, | 474 | '?' => QUESTION, |
475 | '$' => DOLLAR, | 475 | '$' => DOLLAR, |
476 | '&' => AMPERSAND, | 476 | '&' => AMP, |
477 | '|' => PIPE, | 477 | '|' => PIPE, |
478 | '+' => PLUS, | 478 | '+' => PLUS, |
479 | '*' => STAR, | 479 | '*' => STAR, |
@@ -502,7 +502,7 @@ impl SyntaxKind { | |||
502 | TILDE => "~", | 502 | TILDE => "~", |
503 | QUESTION => "?", | 503 | QUESTION => "?", |
504 | DOLLAR => "$", | 504 | DOLLAR => "$", |
505 | AMPERSAND => "&", | 505 | AMP => "&", |
506 | PIPE => "|", | 506 | PIPE => "|", |
507 | PLUS => "+", | 507 | PLUS => "+", |
508 | STAR => "*", | 508 | STAR => "*", |
@@ -526,7 +526,7 @@ impl SyntaxKind { | |||
526 | GTEQ => ">=", | 526 | GTEQ => ">=", |
527 | PLUSEQ => "+=", | 527 | PLUSEQ => "+=", |
528 | MINUSEQ => "-=", | 528 | MINUSEQ => "-=", |
529 | AMPERSANDAMPERSAND => "&&", | 529 | AMPAMP => "&&", |
530 | PIPEPIPE => "||", | 530 | PIPEPIPE => "||", |
531 | 531 | ||
532 | USE_KW => "use", | 532 | USE_KW => "use", |
diff --git a/tests/data/lexer/0005_symbols.txt b/tests/data/lexer/0005_symbols.txt index 0f99c24cd..a6bc83a6f 100644 --- a/tests/data/lexer/0005_symbols.txt +++ b/tests/data/lexer/0005_symbols.txt | |||
@@ -28,7 +28,7 @@ QUESTION 1 "?" | |||
28 | WHITESPACE 1 " " | 28 | WHITESPACE 1 " " |
29 | DOLLAR 1 "$" | 29 | DOLLAR 1 "$" |
30 | WHITESPACE 1 " " | 30 | WHITESPACE 1 " " |
31 | AMPERSAND 1 "&" | 31 | AMP 1 "&" |
32 | WHITESPACE 1 " " | 32 | WHITESPACE 1 " " |
33 | PIPE 1 "|" | 33 | PIPE 1 "|" |
34 | WHITESPACE 1 " " | 34 | WHITESPACE 1 " " |
diff --git a/tests/data/parser/inline/0026_reference_type;.txt b/tests/data/parser/inline/0026_reference_type;.txt index 665c021e1..10fc5f636 100644 --- a/tests/data/parser/inline/0026_reference_type;.txt +++ b/tests/data/parser/inline/0026_reference_type;.txt | |||
@@ -8,7 +8,7 @@ FILE@[0; 54) | |||
8 | EQ@[7; 8) | 8 | EQ@[7; 8) |
9 | REFERENCE_TYPE@[8; 12) | 9 | REFERENCE_TYPE@[8; 12) |
10 | WHITESPACE@[8; 9) | 10 | WHITESPACE@[8; 9) |
11 | AMPERSAND@[9; 10) | 11 | AMP@[9; 10) |
12 | TUPLE_TYPE@[10; 12) | 12 | TUPLE_TYPE@[10; 12) |
13 | L_PAREN@[10; 11) | 13 | L_PAREN@[10; 11) |
14 | R_PAREN@[11; 12) | 14 | R_PAREN@[11; 12) |
@@ -23,7 +23,7 @@ FILE@[0; 54) | |||
23 | EQ@[21; 22) | 23 | EQ@[21; 22) |
24 | REFERENCE_TYPE@[22; 34) | 24 | REFERENCE_TYPE@[22; 34) |
25 | WHITESPACE@[22; 23) | 25 | WHITESPACE@[22; 23) |
26 | AMPERSAND@[23; 24) | 26 | AMP@[23; 24) |
27 | LIFETIME@[24; 31) "'static" | 27 | LIFETIME@[24; 31) "'static" |
28 | TUPLE_TYPE@[31; 34) | 28 | TUPLE_TYPE@[31; 34) |
29 | WHITESPACE@[31; 32) | 29 | WHITESPACE@[31; 32) |
@@ -40,7 +40,7 @@ FILE@[0; 54) | |||
40 | EQ@[43; 44) | 40 | EQ@[43; 44) |
41 | REFERENCE_TYPE@[44; 52) | 41 | REFERENCE_TYPE@[44; 52) |
42 | WHITESPACE@[44; 45) | 42 | WHITESPACE@[44; 45) |
43 | AMPERSAND@[45; 46) | 43 | AMP@[45; 46) |
44 | MUT_KW@[46; 49) | 44 | MUT_KW@[46; 49) |
45 | TUPLE_TYPE@[49; 52) | 45 | TUPLE_TYPE@[49; 52) |
46 | WHITESPACE@[49; 50) | 46 | WHITESPACE@[49; 50) |
diff --git a/tests/data/parser/inline/0035_ref_pat.txt b/tests/data/parser/inline/0035_ref_pat.txt index 27a31d2ab..b3aa6d285 100644 --- a/tests/data/parser/inline/0035_ref_pat.txt +++ b/tests/data/parser/inline/0035_ref_pat.txt | |||
@@ -15,7 +15,7 @@ FILE@[0; 52) | |||
15 | LET_KW@[16; 19) | 15 | LET_KW@[16; 19) |
16 | REF_PAT@[19; 23) | 16 | REF_PAT@[19; 23) |
17 | WHITESPACE@[19; 20) | 17 | WHITESPACE@[19; 20) |
18 | AMPERSAND@[20; 21) | 18 | AMP@[20; 21) |
19 | BIND_PAT@[21; 23) | 19 | BIND_PAT@[21; 23) |
20 | NAME@[21; 23) | 20 | NAME@[21; 23) |
21 | IDENT@[21; 22) "a" | 21 | IDENT@[21; 22) "a" |
@@ -31,7 +31,7 @@ FILE@[0; 52) | |||
31 | LET_KW@[33; 36) | 31 | LET_KW@[33; 36) |
32 | REF_PAT@[36; 44) | 32 | REF_PAT@[36; 44) |
33 | WHITESPACE@[36; 37) | 33 | WHITESPACE@[36; 37) |
34 | AMPERSAND@[37; 38) | 34 | AMP@[37; 38) |
35 | MUT_KW@[38; 41) | 35 | MUT_KW@[38; 41) |
36 | BIND_PAT@[41; 44) | 36 | BIND_PAT@[41; 44) |
37 | NAME@[41; 44) | 37 | NAME@[41; 44) |
diff --git a/tests/data/parser/inline/0044_ref_expr.txt b/tests/data/parser/inline/0044_ref_expr.txt index 65cdfb665..f4b553c56 100644 --- a/tests/data/parser/inline/0044_ref_expr.txt +++ b/tests/data/parser/inline/0044_ref_expr.txt | |||
@@ -20,7 +20,7 @@ FILE@[0; 52) | |||
20 | EQ@[21; 22) | 20 | EQ@[21; 22) |
21 | REF_EXPR@[22; 25) | 21 | REF_EXPR@[22; 25) |
22 | WHITESPACE@[22; 23) | 22 | WHITESPACE@[22; 23) |
23 | AMPERSAND@[23; 24) | 23 | AMP@[23; 24) |
24 | LITERAL@[24; 25) | 24 | LITERAL@[24; 25) |
25 | INT_NUMBER@[24; 25) "1" | 25 | INT_NUMBER@[24; 25) "1" |
26 | SEMI@[25; 26) | 26 | SEMI@[25; 26) |
@@ -34,11 +34,11 @@ FILE@[0; 52) | |||
34 | EQ@[37; 38) | 34 | EQ@[37; 38) |
35 | REF_EXPR@[38; 48) | 35 | REF_EXPR@[38; 48) |
36 | WHITESPACE@[38; 39) | 36 | WHITESPACE@[38; 39) |
37 | AMPERSAND@[39; 40) | 37 | AMP@[39; 40) |
38 | MUT_KW@[40; 43) | 38 | MUT_KW@[40; 43) |
39 | REF_EXPR@[43; 48) | 39 | REF_EXPR@[43; 48) |
40 | WHITESPACE@[43; 44) | 40 | WHITESPACE@[43; 44) |
41 | AMPERSAND@[44; 45) | 41 | AMP@[44; 45) |
42 | CALL_EXPR@[45; 48) | 42 | CALL_EXPR@[45; 48) |
43 | PATH_EXPR@[45; 46) | 43 | PATH_EXPR@[45; 46) |
44 | PATH@[45; 46) | 44 | PATH@[45; 46) |
diff --git a/tests/data/parser/inline/0054_impl_item_items.txt b/tests/data/parser/inline/0054_impl_item_items.txt index ee98619b4..f2aa2bd0e 100644 --- a/tests/data/parser/inline/0054_impl_item_items.txt +++ b/tests/data/parser/inline/0054_impl_item_items.txt | |||
@@ -65,7 +65,7 @@ FILE@[0; 89) | |||
65 | PARAM_LIST@[76; 84) | 65 | PARAM_LIST@[76; 84) |
66 | L_PAREN@[76; 77) | 66 | L_PAREN@[76; 77) |
67 | SELF_PARAM@[77; 82) | 67 | SELF_PARAM@[77; 82) |
68 | AMPERSAND@[77; 78) | 68 | AMP@[77; 78) |
69 | SELF_KW@[78; 82) | 69 | SELF_KW@[78; 82) |
70 | R_PAREN@[82; 83) | 70 | R_PAREN@[82; 83) |
71 | WHITESPACE@[83; 84) | 71 | WHITESPACE@[83; 84) |
diff --git a/tests/data/parser/inline/0055_self_param.txt b/tests/data/parser/inline/0055_self_param.txt index 18760b7b6..6cf3151ea 100644 --- a/tests/data/parser/inline/0055_self_param.txt +++ b/tests/data/parser/inline/0055_self_param.txt | |||
@@ -33,7 +33,7 @@ FILE@[0; 106) | |||
33 | PARAM_LIST@[35; 44) | 33 | PARAM_LIST@[35; 44) |
34 | L_PAREN@[35; 36) | 34 | L_PAREN@[35; 36) |
35 | SELF_PARAM@[36; 41) | 35 | SELF_PARAM@[36; 41) |
36 | AMPERSAND@[36; 37) | 36 | AMP@[36; 37) |
37 | SELF_KW@[37; 41) | 37 | SELF_KW@[37; 41) |
38 | COMMA@[41; 42) | 38 | COMMA@[41; 42) |
39 | R_PAREN@[42; 43) | 39 | R_PAREN@[42; 43) |
@@ -50,7 +50,7 @@ FILE@[0; 106) | |||
50 | PARAM_LIST@[55; 67) | 50 | PARAM_LIST@[55; 67) |
51 | L_PAREN@[55; 56) | 51 | L_PAREN@[55; 56) |
52 | SELF_PARAM@[56; 64) | 52 | SELF_PARAM@[56; 64) |
53 | AMPERSAND@[56; 57) | 53 | AMP@[56; 57) |
54 | LIFETIME@[57; 59) "'a" | 54 | LIFETIME@[57; 59) "'a" |
55 | WHITESPACE@[59; 60) | 55 | WHITESPACE@[59; 60) |
56 | SELF_KW@[60; 64) | 56 | SELF_KW@[60; 64) |
@@ -69,7 +69,7 @@ FILE@[0; 106) | |||
69 | PARAM_LIST@[78; 101) | 69 | PARAM_LIST@[78; 101) |
70 | L_PAREN@[78; 79) | 70 | L_PAREN@[78; 79) |
71 | SELF_PARAM@[79; 91) | 71 | SELF_PARAM@[79; 91) |
72 | AMPERSAND@[79; 80) | 72 | AMP@[79; 80) |
73 | LIFETIME@[80; 82) "'a" | 73 | LIFETIME@[80; 82) "'a" |
74 | WHITESPACE@[82; 83) | 74 | WHITESPACE@[82; 83) |
75 | MUT_KW@[83; 86) | 75 | MUT_KW@[83; 86) |
diff --git a/tests/data/parser/inline/0062_deref_expr.txt b/tests/data/parser/inline/0062_deref_expr.txt index c7e61992a..5c6fe8ea5 100644 --- a/tests/data/parser/inline/0062_deref_expr.txt +++ b/tests/data/parser/inline/0062_deref_expr.txt | |||
@@ -17,7 +17,7 @@ FILE@[0; 23) | |||
17 | DEREF_EXPR@[16; 19) | 17 | DEREF_EXPR@[16; 19) |
18 | STAR@[16; 17) | 18 | STAR@[16; 17) |
19 | REF_EXPR@[17; 19) | 19 | REF_EXPR@[17; 19) |
20 | AMPERSAND@[17; 18) | 20 | AMP@[17; 18) |
21 | LITERAL@[18; 19) | 21 | LITERAL@[18; 19) |
22 | INT_NUMBER@[18; 19) "1" | 22 | INT_NUMBER@[18; 19) "1" |
23 | SEMI@[19; 20) | 23 | SEMI@[19; 20) |
diff --git a/tests/data/parser/inline/0084_compound_ops.rs b/tests/data/parser/inline/0084_compound_ops.rs new file mode 100644 index 000000000..04b1764f1 --- /dev/null +++ b/tests/data/parser/inline/0084_compound_ops.rs | |||
@@ -0,0 +1,6 @@ | |||
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 new file mode 100644 index 000000000..87492fe92 --- /dev/null +++ b/tests/data/parser/inline/0084_compound_ops.txt | |||
@@ -0,0 +1,89 @@ | |||
1 | FILE@[0; 89) | ||
2 | FN_ITEM@[0; 89) | ||
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; 89) | ||
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; 64) | ||
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; 64) | ||
71 | EXPR_STMT@[64; 87) | ||
72 | BIN_EXPR@[64; 85) | ||
73 | LITERAL@[64; 69) | ||
74 | TRUE_KW@[64; 68) | ||
75 | WHITESPACE@[68; 69) | ||
76 | PIPEPIPE@[69; 71) | ||
77 | BIN_EXPR@[71; 85) | ||
78 | LITERAL@[71; 77) | ||
79 | WHITESPACE@[71; 72) | ||
80 | TRUE_KW@[72; 76) | ||
81 | WHITESPACE@[76; 77) | ||
82 | AMPAMP@[77; 79) | ||
83 | LITERAL@[79; 85) | ||
84 | WHITESPACE@[79; 80) | ||
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/0084_loop_expr.rs b/tests/data/parser/inline/0084_loop_expr.rs new file mode 100644 index 000000000..9f078fa48 --- /dev/null +++ b/tests/data/parser/inline/0084_loop_expr.rs | |||
@@ -0,0 +1,3 @@ | |||
1 | fn foo() { | ||
2 | loop {}; | ||
3 | } | ||
diff --git a/tests/data/parser/inline/0084_loop_expr.txt b/tests/data/parser/inline/0084_loop_expr.txt new file mode 100644 index 000000000..858254380 --- /dev/null +++ b/tests/data/parser/inline/0084_loop_expr.txt | |||
@@ -0,0 +1,24 @@ | |||
1 | FILE@[0; 26) | ||
2 | FN_ITEM@[0; 26) | ||
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; 26) | ||
12 | L_CURLY@[9; 10) | ||
13 | EXPR_STMT@[10; 24) | ||
14 | LOOP_EXPR@[10; 22) | ||
15 | WHITESPACE@[10; 15) | ||
16 | LOOP_KW@[15; 19) | ||
17 | BLOCK_EXPR@[19; 22) | ||
18 | WHITESPACE@[19; 20) | ||
19 | L_CURLY@[20; 21) | ||
20 | R_CURLY@[21; 22) | ||
21 | SEMI@[22; 23) | ||
22 | WHITESPACE@[23; 24) | ||
23 | R_CURLY@[24; 25) | ||
24 | WHITESPACE@[25; 26) | ||