aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/grammar/attributes.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/grammar/attributes.rs')
-rw-r--r--crates/ra_syntax/src/grammar/attributes.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/crates/ra_syntax/src/grammar/attributes.rs b/crates/ra_syntax/src/grammar/attributes.rs
index cd30e8a45..2624d2e16 100644
--- a/crates/ra_syntax/src/grammar/attributes.rs
+++ b/crates/ra_syntax/src/grammar/attributes.rs
@@ -1,5 +1,15 @@
1use super::*; 1use super::*;
2 2
3/// Parses both inner & outer attributes.
4///
5/// Allowing to run validation for reporting errors
6/// regarding attributes
7pub(super) fn all_attributes(p: &mut Parser) {
8 while p.at(POUND) {
9 attribute(p, p.nth(1) == EXCL)
10 }
11}
12
3pub(super) fn inner_attributes(p: &mut Parser) { 13pub(super) fn inner_attributes(p: &mut Parser) {
4 while p.current() == POUND && p.nth(1) == EXCL { 14 while p.current() == POUND && p.nth(1) == EXCL {
5 attribute(p, true) 15 attribute(p, true)