aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-08-05 16:18:02 +0100
committerAleksey Kladov <[email protected]>2018-08-05 16:18:02 +0100
commitd44169ab1e2897a90f8aa7d7672d2fe318cceb27 (patch)
treed8e52bfeeda6fcd3d2cbc0624c4f188449c32543 /src
parent720861bcff4b9f67ca4def66e2996015811fa90b (diff)
ampersand -> amp
Diffstat (limited to 'src')
-rw-r--r--src/grammar.ron4
-rw-r--r--src/grammar/expressions/mod.rs8
-rw-r--r--src/grammar/params.rs8
-rw-r--r--src/grammar/patterns.rs4
-rw-r--r--src/grammar/types.rs4
-rw-r--r--src/syntax_kinds/generated.rs14
6 files changed, 21 insertions, 21 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
114const UNARY_EXPR_FIRST: TokenSet = 114const 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// }
110fn ref_pat(p: &mut Parser) { 110fn 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 ();
132fn reference_type(p: &mut Parser) { 132fn 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",