From d334b5a1db9ec6a57f54077d422a3f4b3c8c1178 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 21 Feb 2019 13:27:45 +0300 Subject: move parser to a separate crate --- crates/ra_syntax/src/parsing/grammar/attributes.rs | 31 ---------------------- 1 file changed, 31 deletions(-) delete mode 100644 crates/ra_syntax/src/parsing/grammar/attributes.rs (limited to 'crates/ra_syntax/src/parsing/grammar/attributes.rs') diff --git a/crates/ra_syntax/src/parsing/grammar/attributes.rs b/crates/ra_syntax/src/parsing/grammar/attributes.rs deleted file mode 100644 index cd30e8a45..000000000 --- a/crates/ra_syntax/src/parsing/grammar/attributes.rs +++ /dev/null @@ -1,31 +0,0 @@ -use super::*; - -pub(super) fn inner_attributes(p: &mut Parser) { - while p.current() == POUND && p.nth(1) == EXCL { - attribute(p, true) - } -} - -pub(super) fn outer_attributes(p: &mut Parser) { - while p.at(POUND) { - attribute(p, false) - } -} - -fn attribute(p: &mut Parser, inner: bool) { - let attr = p.start(); - assert!(p.at(POUND)); - p.bump(); - - if inner { - assert!(p.at(EXCL)); - p.bump(); - } - - if p.at(L_BRACK) { - items::token_tree(p); - } else { - p.error("expected `[`"); - } - attr.complete(p, ATTR); -} -- cgit v1.2.3