aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser/src/grammar/attributes.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_parser/src/grammar/attributes.rs')
-rw-r--r--crates/ra_parser/src/grammar/attributes.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_parser/src/grammar/attributes.rs b/crates/ra_parser/src/grammar/attributes.rs
index cd30e8a45..20d58445f 100644
--- a/crates/ra_parser/src/grammar/attributes.rs
+++ b/crates/ra_parser/src/grammar/attributes.rs
@@ -1,28 +1,28 @@
1use super::*; 1use super::*;
2 2
3pub(super) fn inner_attributes(p: &mut Parser) { 3pub(super) fn inner_attributes(p: &mut Parser) {
4 while p.current() == POUND && p.nth(1) == EXCL { 4 while p.current() == T![#] && p.nth(1) == T![!] {
5 attribute(p, true) 5 attribute(p, true)
6 } 6 }
7} 7}
8 8
9pub(super) fn outer_attributes(p: &mut Parser) { 9pub(super) fn outer_attributes(p: &mut Parser) {
10 while p.at(POUND) { 10 while p.at(T![#]) {
11 attribute(p, false) 11 attribute(p, false)
12 } 12 }
13} 13}
14 14
15fn attribute(p: &mut Parser, inner: bool) { 15fn attribute(p: &mut Parser, inner: bool) {
16 let attr = p.start(); 16 let attr = p.start();
17 assert!(p.at(POUND)); 17 assert!(p.at(T![#]));
18 p.bump(); 18 p.bump();
19 19
20 if inner { 20 if inner {
21 assert!(p.at(EXCL)); 21 assert!(p.at(T![!]));
22 p.bump(); 22 p.bump();
23 } 23 }
24 24
25 if p.at(L_BRACK) { 25 if p.at(T!['[']) {
26 items::token_tree(p); 26 items::token_tree(p);
27 } else { 27 } else {
28 p.error("expected `[`"); 28 p.error("expected `[`");