mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 05:45:12 +00:00
Align parser names with grammar
This commit is contained in:
parent
1b0c7701cc
commit
6bc2633c90
17 changed files with 124 additions and 223 deletions
|
@ -2,19 +2,19 @@
|
|||
|
||||
use super::*;
|
||||
|
||||
pub(super) fn inner_attributes(p: &mut Parser) {
|
||||
pub(super) fn inner_attrs(p: &mut Parser) {
|
||||
while p.at(T![#]) && p.nth(1) == T![!] {
|
||||
attribute(p, true)
|
||||
attr(p, true)
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) fn outer_attributes(p: &mut Parser) {
|
||||
pub(super) fn outer_attrs(p: &mut Parser) {
|
||||
while p.at(T![#]) {
|
||||
attribute(p, false)
|
||||
attr(p, false)
|
||||
}
|
||||
}
|
||||
|
||||
fn attribute(p: &mut Parser, inner: bool) {
|
||||
fn attr(p: &mut Parser, inner: bool) {
|
||||
let attr = p.start();
|
||||
assert!(p.at(T![#]));
|
||||
p.bump(T![#]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue