aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser/src/grammar/params.rs
diff options
context:
space:
mode:
authorMatthew Jasper <[email protected]>2020-02-09 18:57:01 +0000
committerMatthew Jasper <[email protected]>2020-02-09 22:06:15 +0000
commit8c8d0bb34f5495e0f260b5aaf3685ecb98406f32 (patch)
tree26df75871f23bb30fbef81fbc3c75beedaf20ab5 /crates/ra_parser/src/grammar/params.rs
parent1b9b13b4b4a75b5531c3f046ce6bf72d681f2732 (diff)
Add or- and parenthesized-patterns
Diffstat (limited to 'crates/ra_parser/src/grammar/params.rs')
-rw-r--r--crates/ra_parser/src/grammar/params.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_parser/src/grammar/params.rs b/crates/ra_parser/src/grammar/params.rs
index 94edc7f35..ed4f93347 100644
--- a/crates/ra_parser/src/grammar/params.rs
+++ b/crates/ra_parser/src/grammar/params.rs
@@ -116,7 +116,7 @@ fn value_parameter(p: &mut Parser, flavor: Flavor) {
116 // type Qux = fn(baz: Bar::Baz); 116 // type Qux = fn(baz: Bar::Baz);
117 Flavor::FnPointer => { 117 Flavor::FnPointer => {
118 if p.at(IDENT) && p.nth(1) == T![:] && !p.nth_at(1, T![::]) { 118 if p.at(IDENT) && p.nth(1) == T![:] && !p.nth_at(1, T![::]) {
119 patterns::pattern(p); 119 patterns::pattern_single(p);
120 types::ascription(p); 120 types::ascription(p);
121 } else { 121 } else {
122 types::type_(p); 122 types::type_(p);
@@ -127,7 +127,7 @@ fn value_parameter(p: &mut Parser, flavor: Flavor) {
127 // let foo = |bar, baz: Baz, qux: Qux::Quux| (); 127 // let foo = |bar, baz: Baz, qux: Qux::Quux| ();
128 // } 128 // }
129 Flavor::Closure => { 129 Flavor::Closure => {
130 patterns::pattern(p); 130 patterns::pattern_single(p);
131 if p.at(T![:]) && !p.at(T![::]) { 131 if p.at(T![:]) && !p.at(T![::]) {
132 types::ascription(p); 132 types::ascription(p);
133 } 133 }