diff options
author | Ville Penttinen <[email protected]> | 2019-02-17 17:08:34 +0000 |
---|---|---|
committer | Ville Penttinen <[email protected]> | 2019-02-17 17:26:57 +0000 |
commit | 1c97c1ac11459d45f7bfc57dc72428d2b294520c (patch) | |
tree | 70638cabf61f96a7511f974cc66dae40175bfb22 /crates/ra_syntax/src/ast | |
parent | 982f72c022b45629e6adbaef22884359d3495ecf (diff) |
Enable parsing of attributes inside a match block
We allow invalid inner attributes to be parsed, e.g. inner attributes that are
not directly after the opening brace of the match block.
Instead we run validation on `MatchArmList` to allow better reporting of errors.
Diffstat (limited to 'crates/ra_syntax/src/ast')
-rw-r--r-- | crates/ra_syntax/src/ast/generated.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs index dd91b5063..c7aaccc95 100644 --- a/crates/ra_syntax/src/ast/generated.rs +++ b/crates/ra_syntax/src/ast/generated.rs | |||
@@ -1946,6 +1946,7 @@ impl ToOwned for MatchArm { | |||
1946 | } | 1946 | } |
1947 | 1947 | ||
1948 | 1948 | ||
1949 | impl ast::AttrsOwner for MatchArm {} | ||
1949 | impl MatchArm { | 1950 | impl MatchArm { |
1950 | pub fn pats(&self) -> impl Iterator<Item = &Pat> { | 1951 | pub fn pats(&self) -> impl Iterator<Item = &Pat> { |
1951 | super::children(self) | 1952 | super::children(self) |
@@ -1986,6 +1987,7 @@ impl ToOwned for MatchArmList { | |||
1986 | } | 1987 | } |
1987 | 1988 | ||
1988 | 1989 | ||
1990 | impl ast::AttrsOwner for MatchArmList {} | ||
1989 | impl MatchArmList { | 1991 | impl MatchArmList { |
1990 | pub fn arms(&self) -> impl Iterator<Item = &MatchArm> { | 1992 | pub fn arms(&self) -> impl Iterator<Item = &MatchArm> { |
1991 | super::children(self) | 1993 | super::children(self) |