Update ungrammar

This commit is contained in:
Jonas Schievink 2021-06-11 18:12:51 +02:00
parent 80b3b74018
commit 1d6eef1350
43 changed files with 801 additions and 676 deletions

4
Cargo.lock generated
View file

@ -1802,9 +1802,9 @@ checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c"
[[package]] [[package]]
name = "ungrammar" name = "ungrammar"
version = "1.13.0" version = "1.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76760314176cc2b94047af2f921b92c39f11a34dc05c43a3c2b0fc91cb22959f" checksum = "50ef6d7335c77ec3e4a7c4be74c2b9e4642569e94a4004c836f8cca71fede3a7"
[[package]] [[package]]
name = "unicase" name = "unicase"

View file

@ -208,7 +208,7 @@ pub(crate) fn hover(
} }
fn try_hover_for_attribute(token: &SyntaxToken) -> Option<RangeInfo<HoverResult>> { fn try_hover_for_attribute(token: &SyntaxToken) -> Option<RangeInfo<HoverResult>> {
let attr = token.ancestors().nth(1).and_then(ast::Attr::cast)?; let attr = token.ancestors().find_map(ast::Attr::cast)?;
let (path, tt) = attr.as_simple_call()?; let (path, tt) = attr.as_simple_call()?;
if !tt.syntax().text_range().contains(token.text_range().start()) { if !tt.syntax().text_range().contains(token.text_range().start()) {
return None; return None;

View file

@ -369,7 +369,7 @@ impl NameRefClass {
} }
if let Some(resolved) = sema.resolve_path(&path) { if let Some(resolved) = sema.resolve_path(&path) {
if path.syntax().parent().and_then(ast::Attr::cast).is_some() { if path.syntax().ancestors().find_map(ast::Attr::cast).is_some() {
if let PathResolution::Def(ModuleDef::Function(func)) = resolved { if let PathResolution::Def(ModuleDef::Function(func)) = resolved {
if func.attrs(sema.db).by_key("proc_macro_attribute").exists() { if func.attrs(sema.db).by_key("proc_macro_attribute").exists() {
return Some(NameRefClass::Definition(resolved.into())); return Some(NameRefClass::Definition(resolved.into()));

View file

@ -1846,16 +1846,17 @@ fn test_no_space_after_semi_colon() {
ATTR@0..21 ATTR@0..21
POUND@0..1 "#" POUND@0..1 "#"
L_BRACK@1..2 "[" L_BRACK@1..2 "["
PATH@2..5 META@2..20
PATH_SEGMENT@2..5 PATH@2..5
NAME_REF@2..5 PATH_SEGMENT@2..5
IDENT@2..5 "cfg" NAME_REF@2..5
TOKEN_TREE@5..20 IDENT@2..5 "cfg"
L_PAREN@5..6 "(" TOKEN_TREE@5..20
IDENT@6..13 "feature" L_PAREN@5..6 "("
EQ@13..14 "=" IDENT@6..13 "feature"
STRING@14..19 "\"std\"" EQ@13..14 "="
R_PAREN@19..20 ")" STRING@14..19 "\"std\""
R_PAREN@19..20 ")"
R_BRACK@20..21 "]" R_BRACK@20..21 "]"
MOD_KW@21..24 "mod" MOD_KW@21..24 "mod"
NAME@24..25 NAME@24..25
@ -1865,16 +1866,17 @@ fn test_no_space_after_semi_colon() {
ATTR@26..47 ATTR@26..47
POUND@26..27 "#" POUND@26..27 "#"
L_BRACK@27..28 "[" L_BRACK@27..28 "["
PATH@28..31 META@28..46
PATH_SEGMENT@28..31 PATH@28..31
NAME_REF@28..31 PATH_SEGMENT@28..31
IDENT@28..31 "cfg" NAME_REF@28..31
TOKEN_TREE@31..46 IDENT@28..31 "cfg"
L_PAREN@31..32 "(" TOKEN_TREE@31..46
IDENT@32..39 "feature" L_PAREN@31..32 "("
EQ@39..40 "=" IDENT@32..39 "feature"
STRING@40..45 "\"std\"" EQ@39..40 "="
R_PAREN@45..46 ")" STRING@40..45 "\"std\""
R_PAREN@45..46 ")"
R_BRACK@46..47 "]" R_BRACK@46..47 "]"
MOD_KW@47..50 "mod" MOD_KW@47..50 "mod"
NAME@50..51 NAME@50..51

View file

@ -13,6 +13,7 @@ pub(super) fn outer_attrs(p: &mut Parser) {
} }
pub(super) fn meta(p: &mut Parser) { pub(super) fn meta(p: &mut Parser) {
let meta = p.start();
paths::use_path(p); paths::use_path(p);
match p.current() { match p.current() {
@ -25,6 +26,8 @@ pub(super) fn meta(p: &mut Parser) {
T!['('] | T!['['] | T!['{'] => items::token_tree(p), T!['('] | T!['['] | T!['{'] => items::token_tree(p),
_ => {} _ => {}
} }
meta.complete(p, META);
} }
fn attr(p: &mut Parser, inner: bool) { fn attr(p: &mut Parser, inner: bool) {

View file

@ -220,7 +220,7 @@ pub enum SyntaxKind {
ITEM_LIST, ITEM_LIST,
ASSOC_ITEM_LIST, ASSOC_ITEM_LIST,
ATTR, ATTR,
META_ITEM, META,
USE_TREE, USE_TREE,
USE_TREE_LIST, USE_TREE_LIST,
PATH, PATH,

View file

@ -150,10 +150,7 @@ impl Attr {
pub fn pound_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![#]) } pub fn pound_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![#]) }
pub fn excl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![!]) } pub fn excl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![!]) }
pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) } pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
pub fn path(&self) -> Option<Path> { support::child(&self.syntax) } pub fn meta(&self) -> Option<Meta> { support::child(&self.syntax) }
pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
pub fn token_tree(&self) -> Option<TokenTree> { support::child(&self.syntax) }
pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) } pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
} }
#[derive(Debug, Clone, PartialEq, Eq, Hash)] #[derive(Debug, Clone, PartialEq, Eq, Hash)]
@ -632,6 +629,16 @@ impl WherePred {
pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) } pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
} }
#[derive(Debug, Clone, PartialEq, Eq, Hash)] #[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct Meta {
pub(crate) syntax: SyntaxNode,
}
impl Meta {
pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
pub fn token_tree(&self) -> Option<TokenTree> { support::child(&self.syntax) }
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct ExprStmt { pub struct ExprStmt {
pub(crate) syntax: SyntaxNode, pub(crate) syntax: SyntaxNode,
} }
@ -2072,6 +2079,17 @@ impl AstNode for WherePred {
} }
fn syntax(&self) -> &SyntaxNode { &self.syntax } fn syntax(&self) -> &SyntaxNode { &self.syntax }
} }
impl AstNode for Meta {
fn can_cast(kind: SyntaxKind) -> bool { kind == META }
fn cast(syntax: SyntaxNode) -> Option<Self> {
if Self::can_cast(syntax.kind()) {
Some(Self { syntax })
} else {
None
}
}
fn syntax(&self) -> &SyntaxNode { &self.syntax }
}
impl AstNode for ExprStmt { impl AstNode for ExprStmt {
fn can_cast(kind: SyntaxKind) -> bool { kind == EXPR_STMT } fn can_cast(kind: SyntaxKind) -> bool { kind == EXPR_STMT }
fn cast(syntax: SyntaxNode) -> Option<Self> { fn cast(syntax: SyntaxNode) -> Option<Self> {
@ -3887,6 +3905,11 @@ impl std::fmt::Display for WherePred {
std::fmt::Display::fmt(self.syntax(), f) std::fmt::Display::fmt(self.syntax(), f)
} }
} }
impl std::fmt::Display for Meta {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
std::fmt::Display::fmt(self.syntax(), f)
}
}
impl std::fmt::Display for ExprStmt { impl std::fmt::Display for ExprStmt {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
std::fmt::Display::fmt(self.syntax(), f) std::fmt::Display::fmt(self.syntax(), f)

View file

@ -144,19 +144,20 @@ impl AttrKind {
impl ast::Attr { impl ast::Attr {
pub fn as_simple_atom(&self) -> Option<SmolStr> { pub fn as_simple_atom(&self) -> Option<SmolStr> {
if self.eq_token().is_some() || self.token_tree().is_some() { let meta = self.meta()?;
if meta.eq_token().is_some() || meta.token_tree().is_some() {
return None; return None;
} }
self.simple_name() self.simple_name()
} }
pub fn as_simple_call(&self) -> Option<(SmolStr, ast::TokenTree)> { pub fn as_simple_call(&self) -> Option<(SmolStr, ast::TokenTree)> {
let tt = self.token_tree()?; let tt = self.meta()?.token_tree()?;
Some((self.simple_name()?, tt)) Some((self.simple_name()?, tt))
} }
pub fn simple_name(&self) -> Option<SmolStr> { pub fn simple_name(&self) -> Option<SmolStr> {
let path = self.path()?; let path = self.meta()?.path()?;
match (path.segment(), path.qualifier()) { match (path.segment(), path.qualifier()) {
(Some(segment), None) => Some(segment.syntax().first_token()?.text().into()), (Some(segment), None) => Some(segment.syntax().first_token()?.text().into()),
_ => None, _ => None,
@ -174,6 +175,18 @@ impl ast::Attr {
_ => AttrKind::Outer, _ => AttrKind::Outer,
} }
} }
pub fn path(&self) -> Option<ast::Path> {
self.meta()?.path()
}
pub fn expr(&self) -> Option<ast::Expr> {
self.meta()?.expr()
}
pub fn token_tree(&self) -> Option<ast::TokenTree> {
self.meta()?.token_tree()
}
} }
#[derive(Debug, Clone, PartialEq, Eq)] #[derive(Debug, Clone, PartialEq, Eq)]

View file

@ -3,20 +3,21 @@ SOURCE_FILE@0..54
ATTR@0..18 ATTR@0..18
POUND@0..1 "#" POUND@0..1 "#"
L_BRACK@1..2 "[" L_BRACK@1..2 "["
PATH@2..5 META@2..17
PATH_SEGMENT@2..5 PATH@2..5
NAME_REF@2..5 PATH_SEGMENT@2..5
IDENT@2..5 "foo" NAME_REF@2..5
TOKEN_TREE@5..17 IDENT@2..5 "foo"
L_PAREN@5..6 "(" TOKEN_TREE@5..17
IDENT@6..9 "foo" L_PAREN@5..6 "("
COMMA@9..10 "," IDENT@6..9 "foo"
WHITESPACE@10..11 " " COMMA@9..10 ","
PLUS@11..12 "+" WHITESPACE@10..11 " "
COMMA@12..13 "," PLUS@11..12 "+"
WHITESPACE@13..14 " " COMMA@12..13 ","
INT_NUMBER@14..16 "92" WHITESPACE@13..14 " "
R_PAREN@16..17 ")" INT_NUMBER@14..16 "92"
R_PAREN@16..17 ")"
R_BRACK@17..18 "]" R_BRACK@17..18 "]"
WHITESPACE@18..19 "\n" WHITESPACE@18..19 "\n"
FN_KW@19..21 "fn" FN_KW@19..21 "fn"
@ -35,24 +36,25 @@ SOURCE_FILE@0..54
ATTR@34..53 ATTR@34..53
POUND@34..35 "#" POUND@34..35 "#"
L_BRACK@35..36 "[" L_BRACK@35..36 "["
PATH@36..39 META@36..53
PATH_SEGMENT@36..39 PATH@36..39
NAME_REF@36..39 PATH_SEGMENT@36..39
IDENT@36..39 "foo" NAME_REF@36..39
TOKEN_TREE@39..53 IDENT@36..39 "foo"
L_PAREN@39..40 "(" TOKEN_TREE@39..53
WHITESPACE@40..41 "\n" L_PAREN@39..40 "("
FN_KW@41..43 "fn" WHITESPACE@40..41 "\n"
WHITESPACE@43..44 " " FN_KW@41..43 "fn"
IDENT@44..47 "foo" WHITESPACE@43..44 " "
TOKEN_TREE@47..49 IDENT@44..47 "foo"
L_PAREN@47..48 "(" TOKEN_TREE@47..49
R_PAREN@48..49 ")" L_PAREN@47..48 "("
WHITESPACE@49..50 " " R_PAREN@48..49 ")"
TOKEN_TREE@50..53 WHITESPACE@49..50 " "
L_CURLY@50..51 "{" TOKEN_TREE@50..53
WHITESPACE@51..52 "\n" L_CURLY@50..51 "{"
R_CURLY@52..53 "}" WHITESPACE@51..52 "\n"
R_CURLY@52..53 "}"
WHITESPACE@53..54 "\n" WHITESPACE@53..54 "\n"
error 53..53: expected R_PAREN error 53..53: expected R_PAREN
error 53..53: expected `]` error 53..53: expected `]`

View file

@ -27,14 +27,15 @@ SOURCE_FILE@0..350
POUND@39..40 "#" POUND@39..40 "#"
BANG@40..41 "!" BANG@40..41 "!"
L_BRACK@41..42 "[" L_BRACK@41..42 "["
PATH@42..45 META@42..82
PATH_SEGMENT@42..45 PATH@42..45
NAME_REF@42..45 PATH_SEGMENT@42..45
IDENT@42..45 "doc" NAME_REF@42..45
TOKEN_TREE@45..82 IDENT@42..45 "doc"
L_PAREN@45..46 "(" TOKEN_TREE@45..82
STRING@46..81 "\"Inner attributes not ..." L_PAREN@45..46 "("
R_PAREN@81..82 ")" STRING@46..81 "\"Inner attributes not ..."
R_PAREN@81..82 ")"
R_BRACK@82..83 "]" R_BRACK@82..83 "]"
WHITESPACE@83..92 "\n " WHITESPACE@83..92 "\n "
COMMENT@92..122 "//! Nor are ModuleDoc ..." COMMENT@92..122 "//! Nor are ModuleDoc ..."
@ -57,28 +58,30 @@ SOURCE_FILE@0..350
POUND@152..153 "#" POUND@152..153 "#"
BANG@153..154 "!" BANG@153..154 "!"
L_BRACK@154..155 "[" L_BRACK@154..155 "["
PATH@155..158 META@155..170
PATH_SEGMENT@155..158 PATH@155..158
NAME_REF@155..158 PATH_SEGMENT@155..158
IDENT@155..158 "doc" NAME_REF@155..158
TOKEN_TREE@158..170 IDENT@155..158 "doc"
L_PAREN@158..159 "(" TOKEN_TREE@158..170
STRING@159..169 "\"Nor here\"" L_PAREN@158..159 "("
R_PAREN@169..170 ")" STRING@159..169 "\"Nor here\""
R_PAREN@169..170 ")"
R_BRACK@170..171 "]" R_BRACK@170..171 "]"
WHITESPACE@171..180 "\n " WHITESPACE@171..180 "\n "
ATTR@180..212 ATTR@180..212
POUND@180..181 "#" POUND@180..181 "#"
BANG@181..182 "!" BANG@181..182 "!"
L_BRACK@182..183 "[" L_BRACK@182..183 "["
PATH@183..186 META@183..211
PATH_SEGMENT@183..186 PATH@183..186
NAME_REF@183..186 PATH_SEGMENT@183..186
IDENT@183..186 "doc" NAME_REF@183..186
TOKEN_TREE@186..211 IDENT@183..186 "doc"
L_PAREN@186..187 "(" TOKEN_TREE@186..211
STRING@187..210 "\"We error on each attr\"" L_PAREN@186..187 "("
R_PAREN@210..211 ")" STRING@187..210 "\"We error on each attr\""
R_PAREN@210..211 ")"
R_BRACK@211..212 "]" R_BRACK@211..212 "]"
WHITESPACE@212..221 "\n " WHITESPACE@212..221 "\n "
COMMENT@221..251 "//! Nor are ModuleDoc ..." COMMENT@221..251 "//! Nor are ModuleDoc ..."
@ -99,14 +102,15 @@ SOURCE_FILE@0..350
POUND@283..284 "#" POUND@283..284 "#"
BANG@284..285 "!" BANG@284..285 "!"
L_BRACK@285..286 "[" L_BRACK@285..286 "["
PATH@286..289 META@286..301
PATH_SEGMENT@286..289 PATH@286..289
NAME_REF@286..289 PATH_SEGMENT@286..289
IDENT@286..289 "doc" NAME_REF@286..289
TOKEN_TREE@289..301 IDENT@286..289 "doc"
L_PAREN@289..290 "(" TOKEN_TREE@289..301
STRING@290..300 "\"Nor here\"" L_PAREN@289..290 "("
R_PAREN@300..301 ")" STRING@290..300 "\"Nor here\""
R_PAREN@300..301 ")"
R_BRACK@301..302 "]" R_BRACK@301..302 "]"
WHITESPACE@302..311 "\n " WHITESPACE@302..311 "\n "
COMMENT@311..341 "//! Nor are ModuleDoc ..." COMMENT@311..341 "//! Nor are ModuleDoc ..."

View file

@ -135,14 +135,15 @@ SOURCE_FILE@0..293
ATTR@210..222 ATTR@210..222
POUND@210..211 "#" POUND@210..211 "#"
L_BRACK@211..212 "[" L_BRACK@211..212 "["
PATH@212..215 META@212..221
PATH_SEGMENT@212..215 PATH@212..215
NAME_REF@212..215 PATH_SEGMENT@212..215
IDENT@212..215 "cfg" NAME_REF@212..215
TOKEN_TREE@215..221 IDENT@212..215 "cfg"
L_PAREN@215..216 "(" TOKEN_TREE@215..221
IDENT@216..220 "test" L_PAREN@215..216 "("
R_PAREN@220..221 ")" IDENT@216..220 "test"
R_PAREN@220..221 ")"
R_BRACK@221..222 "]" R_BRACK@221..222 "]"
WHITESPACE@222..231 "\n " WHITESPACE@222..231 "\n "
ATTR@231..232 ATTR@231..232

View file

@ -47,14 +47,15 @@ SOURCE_FILE@0..89
ATTR@68..80 ATTR@68..80
POUND@68..69 "#" POUND@68..69 "#"
L_BRACK@69..70 "[" L_BRACK@69..70 "["
PATH@70..73 META@70..79
PATH_SEGMENT@70..73 PATH@70..73
NAME_REF@70..73 PATH_SEGMENT@70..73
IDENT@70..73 "cfg" NAME_REF@70..73
TOKEN_TREE@73..79 IDENT@70..73 "cfg"
L_PAREN@73..74 "(" TOKEN_TREE@73..79
IDENT@74..78 "test" L_PAREN@73..74 "("
R_PAREN@78..79 ")" IDENT@74..78 "test"
R_PAREN@78..79 ")"
R_BRACK@79..80 "]" R_BRACK@79..80 "]"
WHITESPACE@80..85 "\n " WHITESPACE@80..85 "\n "
R_CURLY@85..86 "}" R_CURLY@85..86 "}"

View file

@ -15,10 +15,11 @@ SOURCE_FILE@0..48
ATTR@14..18 ATTR@14..18
POUND@14..15 "#" POUND@14..15 "#"
L_BRACK@15..16 "[" L_BRACK@15..16 "["
PATH@16..17 META@16..17
PATH_SEGMENT@16..17 PATH@16..17
NAME_REF@16..17 PATH_SEGMENT@16..17
IDENT@16..17 "A" NAME_REF@16..17
IDENT@16..17 "A"
R_BRACK@17..18 "]" R_BRACK@17..18 "]"
WHITESPACE@18..19 " " WHITESPACE@18..19 " "
BIN_EXPR@19..24 BIN_EXPR@19..24
@ -35,10 +36,11 @@ SOURCE_FILE@0..48
ATTR@29..33 ATTR@29..33
POUND@29..30 "#" POUND@29..30 "#"
L_BRACK@30..31 "[" L_BRACK@30..31 "["
PATH@31..32 META@31..32
PATH_SEGMENT@31..32 PATH@31..32
NAME_REF@31..32 PATH_SEGMENT@31..32
IDENT@31..32 "B" NAME_REF@31..32
IDENT@31..32 "B"
R_BRACK@32..33 "]" R_BRACK@32..33 "]"
WHITESPACE@33..34 " " WHITESPACE@33..34 " "
IF_EXPR@34..44 IF_EXPR@34..44

View file

@ -12,18 +12,19 @@ SOURCE_FILE@0..64
ATTR@15..43 ATTR@15..43
POUND@15..16 "#" POUND@15..16 "#"
L_BRACK@16..17 "[" L_BRACK@16..17 "["
PATH@17..22 META@17..42
PATH_SEGMENT@17..22 PATH@17..22
NAME_REF@17..22 PATH_SEGMENT@17..22
IDENT@17..22 "serde" NAME_REF@17..22
TOKEN_TREE@22..42 IDENT@17..22 "serde"
L_PAREN@22..23 "(" TOKEN_TREE@22..42
IDENT@23..27 "with" L_PAREN@22..23 "("
WHITESPACE@27..28 " " IDENT@23..27 "with"
EQ@28..29 "=" WHITESPACE@27..28 " "
WHITESPACE@29..30 " " EQ@28..29 "="
STRING@30..41 "\"url_serde\"" WHITESPACE@29..30 " "
R_PAREN@41..42 ")" STRING@30..41 "\"url_serde\""
R_PAREN@41..42 ")"
R_BRACK@42..43 "]" R_BRACK@42..43 "]"
WHITESPACE@43..48 "\n " WHITESPACE@43..48 "\n "
VISIBILITY@48..51 VISIBILITY@48..51

View file

@ -12,18 +12,19 @@ SOURCE_FILE@0..60
ATTR@15..43 ATTR@15..43
POUND@15..16 "#" POUND@15..16 "#"
L_BRACK@16..17 "[" L_BRACK@16..17 "["
PATH@17..22 META@17..42
PATH_SEGMENT@17..22 PATH@17..22
NAME_REF@17..22 PATH_SEGMENT@17..22
IDENT@17..22 "serde" NAME_REF@17..22
TOKEN_TREE@22..42 IDENT@17..22 "serde"
L_PAREN@22..23 "(" TOKEN_TREE@22..42
IDENT@23..27 "with" L_PAREN@22..23 "("
WHITESPACE@27..28 " " IDENT@23..27 "with"
EQ@28..29 "=" WHITESPACE@27..28 " "
WHITESPACE@29..30 " " EQ@28..29 "="
STRING@30..41 "\"url_serde\"" WHITESPACE@29..30 " "
R_PAREN@41..42 ")" STRING@30..41 "\"url_serde\""
R_PAREN@41..42 ")"
R_BRACK@42..43 "]" R_BRACK@42..43 "]"
WHITESPACE@43..48 "\n " WHITESPACE@43..48 "\n "
VISIBILITY@48..51 VISIBILITY@48..51

View file

@ -26,14 +26,15 @@ SOURCE_FILE@0..94
POUND@54..55 "#" POUND@54..55 "#"
BANG@55..56 "!" BANG@55..56 "!"
L_BRACK@56..57 "[" L_BRACK@56..57 "["
PATH@57..60 META@57..90
PATH_SEGMENT@57..60 PATH@57..60
NAME_REF@57..60 PATH_SEGMENT@57..60
IDENT@57..60 "doc" NAME_REF@57..60
TOKEN_TREE@60..90 IDENT@57..60 "doc"
L_PAREN@60..61 "(" TOKEN_TREE@60..90
STRING@61..89 "\"This is also a doc c ..." L_PAREN@60..61 "("
R_PAREN@89..90 ")" STRING@61..89 "\"This is also a doc c ..."
R_PAREN@89..90 ")"
R_BRACK@90..91 "]" R_BRACK@90..91 "]"
WHITESPACE@91..92 "\n" WHITESPACE@91..92 "\n"
R_CURLY@92..93 "}" R_CURLY@92..93 "}"

View file

@ -25,42 +25,45 @@ SOURCE_FILE@0..139
POUND@34..35 "#" POUND@34..35 "#"
BANG@35..36 "!" BANG@35..36 "!"
L_BRACK@36..37 "[" L_BRACK@36..37 "["
PATH@37..40 META@37..59
PATH_SEGMENT@37..40 PATH@37..40
NAME_REF@37..40 PATH_SEGMENT@37..40
IDENT@37..40 "doc" NAME_REF@37..40
TOKEN_TREE@40..59 IDENT@37..40 "doc"
L_PAREN@40..41 "(" TOKEN_TREE@40..59
STRING@41..58 "\"Inner attribute\"" L_PAREN@40..41 "("
R_PAREN@58..59 ")" STRING@41..58 "\"Inner attribute\""
R_PAREN@58..59 ")"
R_BRACK@59..60 "]" R_BRACK@59..60 "]"
WHITESPACE@60..69 "\n " WHITESPACE@60..69 "\n "
ATTR@69..86 ATTR@69..86
POUND@69..70 "#" POUND@69..70 "#"
BANG@70..71 "!" BANG@70..71 "!"
L_BRACK@71..72 "[" L_BRACK@71..72 "["
PATH@72..75 META@72..85
PATH_SEGMENT@72..75 PATH@72..75
NAME_REF@72..75 PATH_SEGMENT@72..75
IDENT@72..75 "doc" NAME_REF@72..75
TOKEN_TREE@75..85 IDENT@72..75 "doc"
L_PAREN@75..76 "(" TOKEN_TREE@75..85
STRING@76..84 "\"Can be\"" L_PAREN@75..76 "("
R_PAREN@84..85 ")" STRING@76..84 "\"Can be\""
R_PAREN@84..85 ")"
R_BRACK@85..86 "]" R_BRACK@85..86 "]"
WHITESPACE@86..95 "\n " WHITESPACE@86..95 "\n "
ATTR@95..113 ATTR@95..113
POUND@95..96 "#" POUND@95..96 "#"
BANG@96..97 "!" BANG@96..97 "!"
L_BRACK@97..98 "[" L_BRACK@97..98 "["
PATH@98..101 META@98..112
PATH_SEGMENT@98..101 PATH@98..101
NAME_REF@98..101 PATH_SEGMENT@98..101
IDENT@98..101 "doc" NAME_REF@98..101
TOKEN_TREE@101..112 IDENT@98..101 "doc"
L_PAREN@101..102 "(" TOKEN_TREE@101..112
STRING@102..111 "\"Stacked\"" L_PAREN@101..102 "("
R_PAREN@111..112 ")" STRING@102..111 "\"Stacked\""
R_PAREN@111..112 ")"
R_BRACK@112..113 "]" R_BRACK@112..113 "]"
WHITESPACE@113..122 "\n " WHITESPACE@113..122 "\n "
MATCH_ARM@122..129 MATCH_ARM@122..129

View file

@ -25,18 +25,19 @@ SOURCE_FILE@0..259
ATTR@34..58 ATTR@34..58
POUND@34..35 "#" POUND@34..35 "#"
L_BRACK@35..36 "[" L_BRACK@35..36 "["
PATH@36..39 META@36..57
PATH_SEGMENT@36..39 PATH@36..39
NAME_REF@36..39 PATH_SEGMENT@36..39
IDENT@36..39 "cfg" NAME_REF@36..39
TOKEN_TREE@39..57 IDENT@36..39 "cfg"
L_PAREN@39..40 "(" TOKEN_TREE@39..57
IDENT@40..47 "feature" L_PAREN@39..40 "("
WHITESPACE@47..48 " " IDENT@40..47 "feature"
EQ@48..49 "=" WHITESPACE@47..48 " "
WHITESPACE@49..50 " " EQ@48..49 "="
STRING@50..56 "\"some\"" WHITESPACE@49..50 " "
R_PAREN@56..57 ")" STRING@50..56 "\"some\""
R_PAREN@56..57 ")"
R_BRACK@57..58 "]" R_BRACK@57..58 "]"
WHITESPACE@58..67 "\n " WHITESPACE@58..67 "\n "
WILDCARD_PAT@67..68 WILDCARD_PAT@67..68
@ -53,18 +54,19 @@ SOURCE_FILE@0..259
ATTR@84..109 ATTR@84..109
POUND@84..85 "#" POUND@84..85 "#"
L_BRACK@85..86 "[" L_BRACK@85..86 "["
PATH@86..89 META@86..108
PATH_SEGMENT@86..89 PATH@86..89
NAME_REF@86..89 PATH_SEGMENT@86..89
IDENT@86..89 "cfg" NAME_REF@86..89
TOKEN_TREE@89..108 IDENT@86..89 "cfg"
L_PAREN@89..90 "(" TOKEN_TREE@89..108
IDENT@90..97 "feature" L_PAREN@89..90 "("
WHITESPACE@97..98 " " IDENT@90..97 "feature"
EQ@98..99 "=" WHITESPACE@97..98 " "
WHITESPACE@99..100 " " EQ@98..99 "="
STRING@100..107 "\"other\"" WHITESPACE@99..100 " "
R_PAREN@107..108 ")" STRING@100..107 "\"other\""
R_PAREN@107..108 ")"
R_BRACK@108..109 "]" R_BRACK@108..109 "]"
WHITESPACE@109..118 "\n " WHITESPACE@109..118 "\n "
WILDCARD_PAT@118..119 WILDCARD_PAT@118..119
@ -81,52 +83,55 @@ SOURCE_FILE@0..259
ATTR@135..159 ATTR@135..159
POUND@135..136 "#" POUND@135..136 "#"
L_BRACK@136..137 "[" L_BRACK@136..137 "["
PATH@137..140 META@137..158
PATH_SEGMENT@137..140 PATH@137..140
NAME_REF@137..140 PATH_SEGMENT@137..140
IDENT@137..140 "cfg" NAME_REF@137..140
TOKEN_TREE@140..158 IDENT@137..140 "cfg"
L_PAREN@140..141 "(" TOKEN_TREE@140..158
IDENT@141..148 "feature" L_PAREN@140..141 "("
WHITESPACE@148..149 " " IDENT@141..148 "feature"
EQ@149..150 "=" WHITESPACE@148..149 " "
WHITESPACE@150..151 " " EQ@149..150 "="
STRING@151..157 "\"many\"" WHITESPACE@150..151 " "
R_PAREN@157..158 ")" STRING@151..157 "\"many\""
R_PAREN@157..158 ")"
R_BRACK@158..159 "]" R_BRACK@158..159 "]"
WHITESPACE@159..168 "\n " WHITESPACE@159..168 "\n "
ATTR@168..198 ATTR@168..198
POUND@168..169 "#" POUND@168..169 "#"
L_BRACK@169..170 "[" L_BRACK@169..170 "["
PATH@170..173 META@170..197
PATH_SEGMENT@170..173 PATH@170..173
NAME_REF@170..173 PATH_SEGMENT@170..173
IDENT@170..173 "cfg" NAME_REF@170..173
TOKEN_TREE@173..197 IDENT@170..173 "cfg"
L_PAREN@173..174 "(" TOKEN_TREE@173..197
IDENT@174..181 "feature" L_PAREN@173..174 "("
WHITESPACE@181..182 " " IDENT@174..181 "feature"
EQ@182..183 "=" WHITESPACE@181..182 " "
WHITESPACE@183..184 " " EQ@182..183 "="
STRING@184..196 "\"attributes\"" WHITESPACE@183..184 " "
R_PAREN@196..197 ")" STRING@184..196 "\"attributes\""
R_PAREN@196..197 ")"
R_BRACK@197..198 "]" R_BRACK@197..198 "]"
WHITESPACE@198..207 "\n " WHITESPACE@198..207 "\n "
ATTR@207..233 ATTR@207..233
POUND@207..208 "#" POUND@207..208 "#"
L_BRACK@208..209 "[" L_BRACK@208..209 "["
PATH@209..212 META@209..232
PATH_SEGMENT@209..212 PATH@209..212
NAME_REF@209..212 PATH_SEGMENT@209..212
IDENT@209..212 "cfg" NAME_REF@209..212
TOKEN_TREE@212..232 IDENT@209..212 "cfg"
L_PAREN@212..213 "(" TOKEN_TREE@212..232
IDENT@213..220 "feature" L_PAREN@212..213 "("
WHITESPACE@220..221 " " IDENT@213..220 "feature"
EQ@221..222 "=" WHITESPACE@220..221 " "
WHITESPACE@222..223 " " EQ@221..222 "="
STRING@223..231 "\"before\"" WHITESPACE@222..223 " "
R_PAREN@231..232 ")" STRING@223..231 "\"before\""
R_PAREN@231..232 ")"
R_BRACK@232..233 "]" R_BRACK@232..233 "]"
WHITESPACE@233..242 "\n " WHITESPACE@233..242 "\n "
WILDCARD_PAT@242..243 WILDCARD_PAT@242..243

View file

@ -10,14 +10,15 @@ SOURCE_FILE@0..64
ATTR@7..26 ATTR@7..26
POUND@7..8 "#" POUND@7..8 "#"
L_BRACK@8..9 "[" L_BRACK@8..9 "["
PATH@9..15 META@9..25
PATH_SEGMENT@9..15 PATH@9..15
NAME_REF@9..15 PATH_SEGMENT@9..15
IDENT@9..15 "derive" NAME_REF@9..15
TOKEN_TREE@15..25 IDENT@9..15 "derive"
L_PAREN@15..16 "(" TOKEN_TREE@15..25
IDENT@16..24 "Lifetime" L_PAREN@15..16 "("
R_PAREN@24..25 ")" IDENT@16..24 "Lifetime"
R_PAREN@24..25 ")"
R_BRACK@25..26 "]" R_BRACK@25..26 "]"
WHITESPACE@26..27 " " WHITESPACE@26..27 " "
LIFETIME@27..29 LIFETIME@27..29
@ -28,14 +29,15 @@ SOURCE_FILE@0..64
ATTR@31..46 ATTR@31..46
POUND@31..32 "#" POUND@31..32 "#"
L_BRACK@32..33 "[" L_BRACK@32..33 "["
PATH@33..39 META@33..45
PATH_SEGMENT@33..39 PATH@33..39
NAME_REF@33..39 PATH_SEGMENT@33..39
IDENT@33..39 "derive" NAME_REF@33..39
TOKEN_TREE@39..45 IDENT@33..39 "derive"
L_PAREN@39..40 "(" TOKEN_TREE@39..45
IDENT@40..44 "Type" L_PAREN@39..40 "("
R_PAREN@44..45 ")" IDENT@40..44 "Type"
R_PAREN@44..45 ")"
R_BRACK@45..46 "]" R_BRACK@45..46 "]"
WHITESPACE@46..47 " " WHITESPACE@46..47 " "
NAME@47..48 NAME@47..48

View file

@ -24,14 +24,15 @@ SOURCE_FILE@0..46
ATTR@20..32 ATTR@20..32
POUND@20..21 "#" POUND@20..21 "#"
L_BRACK@21..22 "[" L_BRACK@21..22 "["
PATH@22..25 META@22..31
PATH_SEGMENT@22..25 PATH@22..25
NAME_REF@22..25 PATH_SEGMENT@22..25
IDENT@22..25 "cfg" NAME_REF@22..25
TOKEN_TREE@25..31 IDENT@22..25 "cfg"
L_PAREN@25..26 "(" TOKEN_TREE@25..31
IDENT@26..30 "test" L_PAREN@25..26 "("
R_PAREN@30..31 ")" IDENT@26..30 "test"
R_PAREN@30..31 ")"
R_BRACK@31..32 "]" R_BRACK@31..32 "]"
WHITESPACE@32..33 " " WHITESPACE@32..33 " "
NAME_REF@33..38 NAME_REF@33..38

View file

@ -15,10 +15,11 @@ SOURCE_FILE@0..82
ATTR@15..19 ATTR@15..19
POUND@15..16 "#" POUND@15..16 "#"
L_BRACK@16..17 "[" L_BRACK@16..17 "["
PATH@17..18 META@17..18
PATH_SEGMENT@17..18 PATH@17..18
NAME_REF@17..18 PATH_SEGMENT@17..18
IDENT@17..18 "A" NAME_REF@17..18
IDENT@17..18 "A"
R_BRACK@18..19 "]" R_BRACK@18..19 "]"
WHITESPACE@19..20 " " WHITESPACE@19..20 " "
CALL_EXPR@20..25 CALL_EXPR@20..25
@ -36,10 +37,11 @@ SOURCE_FILE@0..82
ATTR@31..35 ATTR@31..35
POUND@31..32 "#" POUND@31..32 "#"
L_BRACK@32..33 "[" L_BRACK@32..33 "["
PATH@33..34 META@33..34
PATH_SEGMENT@33..34 PATH@33..34
NAME_REF@33..34 PATH_SEGMENT@33..34
IDENT@33..34 "B" NAME_REF@33..34
IDENT@33..34 "B"
R_BRACK@34..35 "]" R_BRACK@34..35 "]"
WHITESPACE@35..36 " " WHITESPACE@35..36 " "
MACRO_CALL@36..42 MACRO_CALL@36..42
@ -56,19 +58,21 @@ SOURCE_FILE@0..82
ATTR@47..51 ATTR@47..51
POUND@47..48 "#" POUND@47..48 "#"
L_BRACK@48..49 "[" L_BRACK@48..49 "["
PATH@49..50 META@49..50
PATH_SEGMENT@49..50 PATH@49..50
NAME_REF@49..50 PATH_SEGMENT@49..50
IDENT@49..50 "C" NAME_REF@49..50
IDENT@49..50 "C"
R_BRACK@50..51 "]" R_BRACK@50..51 "]"
WHITESPACE@51..52 " " WHITESPACE@51..52 " "
ATTR@52..56 ATTR@52..56
POUND@52..53 "#" POUND@52..53 "#"
L_BRACK@53..54 "[" L_BRACK@53..54 "["
PATH@54..55 META@54..55
PATH_SEGMENT@54..55 PATH@54..55
NAME_REF@54..55 PATH_SEGMENT@54..55
IDENT@54..55 "D" NAME_REF@54..55
IDENT@54..55 "D"
R_BRACK@55..56 "]" R_BRACK@55..56 "]"
WHITESPACE@56..57 " " WHITESPACE@56..57 " "
BLOCK_EXPR@57..59 BLOCK_EXPR@57..59
@ -79,10 +83,11 @@ SOURCE_FILE@0..82
ATTR@64..68 ATTR@64..68
POUND@64..65 "#" POUND@64..65 "#"
L_BRACK@65..66 "[" L_BRACK@65..66 "["
PATH@66..67 META@66..67
PATH_SEGMENT@66..67 PATH@66..67
NAME_REF@66..67 PATH_SEGMENT@66..67
IDENT@66..67 "D" NAME_REF@66..67
IDENT@66..67 "D"
R_BRACK@67..68 "]" R_BRACK@67..68 "]"
WHITESPACE@68..69 " " WHITESPACE@68..69 " "
RETURN_EXPR@69..78 RETURN_EXPR@69..78

View file

@ -19,10 +19,11 @@ SOURCE_FILE@0..47
ATTR@17..21 ATTR@17..21
POUND@17..18 "#" POUND@17..18 "#"
L_BRACK@18..19 "[" L_BRACK@18..19 "["
PATH@19..20 META@19..20
PATH_SEGMENT@19..20 PATH@19..20
NAME_REF@19..20 PATH_SEGMENT@19..20
IDENT@19..20 "A" NAME_REF@19..20
IDENT@19..20 "A"
R_BRACK@20..21 "]" R_BRACK@20..21 "]"
WHITESPACE@21..22 " " WHITESPACE@21..22 " "
MACRO_CALL@22..28 MACRO_CALL@22..28
@ -42,10 +43,11 @@ SOURCE_FILE@0..47
ATTR@36..40 ATTR@36..40
POUND@36..37 "#" POUND@36..37 "#"
L_BRACK@37..38 "[" L_BRACK@37..38 "["
PATH@38..39 META@38..39
PATH_SEGMENT@38..39 PATH@38..39
NAME_REF@38..39 PATH_SEGMENT@38..39
IDENT@38..39 "B" NAME_REF@38..39
IDENT@38..39 "B"
R_BRACK@39..40 "]" R_BRACK@39..40 "]"
WHITESPACE@40..41 " " WHITESPACE@40..41 " "
AMP@41..42 "&" AMP@41..42 "&"

View file

@ -109,10 +109,11 @@ SOURCE_FILE@0..135
ATTR@120..127 ATTR@120..127
POUND@120..121 "#" POUND@120..121 "#"
L_BRACK@121..122 "[" L_BRACK@121..122 "["
PATH@122..126 META@122..126
PATH_SEGMENT@122..126 PATH@122..126
NAME_REF@122..126 PATH_SEGMENT@122..126
IDENT@122..126 "attr" NAME_REF@122..126
IDENT@122..126 "attr"
R_BRACK@126..127 "]" R_BRACK@126..127 "]"
PARAM_LIST@127..129 PARAM_LIST@127..129
PIPE@127..128 "|" PIPE@127..128 "|"

View file

@ -10,10 +10,11 @@ SOURCE_FILE@0..26
ATTR@5..16 ATTR@5..16
POUND@5..6 "#" POUND@5..6 "#"
L_BRACK@6..7 "[" L_BRACK@6..7 "["
PATH@7..15 META@7..15
PATH_SEGMENT@7..15 PATH@7..15
NAME_REF@7..15 PATH_SEGMENT@7..15
IDENT@7..15 "must_use" NAME_REF@7..15
IDENT@7..15 "must_use"
R_BRACK@15..16 "]" R_BRACK@15..16 "]"
WHITESPACE@16..17 " " WHITESPACE@16..17 " "
NAME@17..21 NAME@17..21

View file

@ -10,10 +10,11 @@ SOURCE_FILE@0..28
ATTR@5..13 ATTR@5..13
POUND@5..6 "#" POUND@5..6 "#"
L_BRACK@6..7 "[" L_BRACK@6..7 "["
PATH@7..12 META@7..12
PATH_SEGMENT@7..12 PATH@7..12
NAME_REF@7..12 PATH_SEGMENT@7..12
IDENT@7..12 "attr1" NAME_REF@7..12
IDENT@7..12 "attr1"
R_BRACK@12..13 "]" R_BRACK@12..13 "]"
WHITESPACE@13..14 " " WHITESPACE@13..14 " "
IDENT_PAT@14..17 IDENT_PAT@14..17

View file

@ -87,17 +87,18 @@ SOURCE_FILE@0..102
ATTR@73..86 ATTR@73..86
POUND@73..74 "#" POUND@73..74 "#"
L_BRACK@74..75 "[" L_BRACK@74..75 "["
PATH@75..78 META@75..85
PATH_SEGMENT@75..78 PATH@75..78
NAME_REF@75..78 PATH_SEGMENT@75..78
IDENT@75..78 "cfg" NAME_REF@75..78
TOKEN_TREE@78..85 IDENT@75..78 "cfg"
L_PAREN@78..79 "(" TOKEN_TREE@78..85
IDENT@79..82 "any" L_PAREN@78..79 "("
TOKEN_TREE@82..84 IDENT@79..82 "any"
L_PAREN@82..83 "(" TOKEN_TREE@82..84
R_PAREN@83..84 ")" L_PAREN@82..83 "("
R_PAREN@84..85 ")" R_PAREN@83..84 ")"
R_PAREN@84..85 ")"
R_BRACK@85..86 "]" R_BRACK@85..86 "]"
WHITESPACE@86..87 " " WHITESPACE@86..87 " "
NAME_REF@87..88 NAME_REF@87..88

View file

@ -31,14 +31,15 @@ SOURCE_FILE@0..40
ATTR@23..35 ATTR@23..35
POUND@23..24 "#" POUND@23..24 "#"
L_BRACK@24..25 "[" L_BRACK@24..25 "["
PATH@25..28 META@25..34
PATH_SEGMENT@25..28 PATH@25..28
NAME_REF@25..28 PATH_SEGMENT@25..28
IDENT@25..28 "cfg" NAME_REF@25..28
TOKEN_TREE@28..34 IDENT@25..28 "cfg"
L_PAREN@28..29 "(" TOKEN_TREE@28..34
IDENT@29..33 "test" L_PAREN@28..29 "("
R_PAREN@33..34 ")" IDENT@29..33 "test"
R_PAREN@33..34 ")"
R_BRACK@34..35 "]" R_BRACK@34..35 "]"
WHITESPACE@35..36 " " WHITESPACE@35..36 " "
INT_NUMBER@36..37 "2" INT_NUMBER@36..37 "2"

View file

@ -23,10 +23,11 @@ SOURCE_FILE@0..34
ATTR@20..27 ATTR@20..27
POUND@20..21 "#" POUND@20..21 "#"
L_BRACK@21..22 "[" L_BRACK@21..22 "["
PATH@22..26 META@22..26
PATH_SEGMENT@22..26 PATH@22..26
NAME_REF@22..26 PATH_SEGMENT@22..26
IDENT@22..26 "attr" NAME_REF@22..26
IDENT@22..26 "attr"
R_BRACK@26..27 "]" R_BRACK@26..27 "]"
WHITESPACE@27..28 " " WHITESPACE@27..28 " "
INT_NUMBER@28..30 "92" INT_NUMBER@28..30 "92"

View file

@ -34,14 +34,15 @@ SOURCE_FILE@0..43
ATTR@26..38 ATTR@26..38
POUND@26..27 "#" POUND@26..27 "#"
L_BRACK@27..28 "[" L_BRACK@27..28 "["
PATH@28..31 META@28..37
PATH_SEGMENT@28..31 PATH@28..31
NAME_REF@28..31 PATH_SEGMENT@28..31
IDENT@28..31 "cfg" NAME_REF@28..31
TOKEN_TREE@31..37 IDENT@28..31 "cfg"
L_PAREN@31..32 "(" TOKEN_TREE@31..37
IDENT@32..36 "test" L_PAREN@31..32 "("
R_PAREN@36..37 ")" IDENT@32..36 "test"
R_PAREN@36..37 ")"
R_BRACK@37..38 "]" R_BRACK@37..38 "]"
WHITESPACE@38..39 " " WHITESPACE@38..39 " "
INT_NUMBER@39..40 "2" INT_NUMBER@39..40 "2"

View file

@ -3,182 +3,192 @@ SOURCE_FILE@0..236
POUND@0..1 "#" POUND@0..1 "#"
BANG@1..2 "!" BANG@1..2 "!"
L_BRACK@2..3 "[" L_BRACK@2..3 "["
PATH@3..7 META@3..7
PATH_SEGMENT@3..7 PATH@3..7
NAME_REF@3..7 PATH_SEGMENT@3..7
IDENT@3..7 "attr" NAME_REF@3..7
IDENT@3..7 "attr"
R_BRACK@7..8 "]" R_BRACK@7..8 "]"
WHITESPACE@8..9 "\n" WHITESPACE@8..9 "\n"
ATTR@9..23 ATTR@9..23
POUND@9..10 "#" POUND@9..10 "#"
BANG@10..11 "!" BANG@10..11 "!"
L_BRACK@11..12 "[" L_BRACK@11..12 "["
PATH@12..16 META@12..22
PATH_SEGMENT@12..16 PATH@12..16
NAME_REF@12..16 PATH_SEGMENT@12..16
IDENT@12..16 "attr" NAME_REF@12..16
TOKEN_TREE@16..22 IDENT@12..16 "attr"
L_PAREN@16..17 "(" TOKEN_TREE@16..22
TRUE_KW@17..21 "true" L_PAREN@16..17 "("
R_PAREN@21..22 ")" TRUE_KW@17..21 "true"
R_PAREN@21..22 ")"
R_BRACK@22..23 "]" R_BRACK@22..23 "]"
WHITESPACE@23..24 "\n" WHITESPACE@23..24 "\n"
ATTR@24..39 ATTR@24..39
POUND@24..25 "#" POUND@24..25 "#"
BANG@25..26 "!" BANG@25..26 "!"
L_BRACK@26..27 "[" L_BRACK@26..27 "["
PATH@27..31 META@27..38
PATH_SEGMENT@27..31 PATH@27..31
NAME_REF@27..31 PATH_SEGMENT@27..31
IDENT@27..31 "attr" NAME_REF@27..31
TOKEN_TREE@31..38 IDENT@27..31 "attr"
L_PAREN@31..32 "(" TOKEN_TREE@31..38
IDENT@32..37 "ident" L_PAREN@31..32 "("
R_PAREN@37..38 ")" IDENT@32..37 "ident"
R_PAREN@37..38 ")"
R_BRACK@38..39 "]" R_BRACK@38..39 "]"
WHITESPACE@39..40 "\n" WHITESPACE@39..40 "\n"
ATTR@40..116 ATTR@40..116
POUND@40..41 "#" POUND@40..41 "#"
BANG@41..42 "!" BANG@41..42 "!"
L_BRACK@42..43 "[" L_BRACK@42..43 "["
PATH@43..47 META@43..115
PATH_SEGMENT@43..47 PATH@43..47
NAME_REF@43..47 PATH_SEGMENT@43..47
IDENT@43..47 "attr" NAME_REF@43..47
TOKEN_TREE@47..115 IDENT@43..47 "attr"
L_PAREN@47..48 "(" TOKEN_TREE@47..115
IDENT@48..53 "ident" L_PAREN@47..48 "("
COMMA@53..54 "," IDENT@48..53 "ident"
WHITESPACE@54..55 " " COMMA@53..54 ","
INT_NUMBER@55..58 "100" WHITESPACE@54..55 " "
COMMA@58..59 "," INT_NUMBER@55..58 "100"
WHITESPACE@59..60 " " COMMA@58..59 ","
TRUE_KW@60..64 "true" WHITESPACE@59..60 " "
COMMA@64..65 "," TRUE_KW@60..64 "true"
WHITESPACE@65..66 " " COMMA@64..65 ","
STRING@66..72 "\"true\"" WHITESPACE@65..66 " "
COMMA@72..73 "," STRING@66..72 "\"true\""
WHITESPACE@73..74 " " COMMA@72..73 ","
IDENT@74..79 "ident" WHITESPACE@73..74 " "
WHITESPACE@79..80 " " IDENT@74..79 "ident"
EQ@80..81 "=" WHITESPACE@79..80 " "
WHITESPACE@81..82 " " EQ@80..81 "="
INT_NUMBER@82..85 "100" WHITESPACE@81..82 " "
COMMA@85..86 "," INT_NUMBER@82..85 "100"
WHITESPACE@86..87 " " COMMA@85..86 ","
IDENT@87..92 "ident" WHITESPACE@86..87 " "
WHITESPACE@92..93 " " IDENT@87..92 "ident"
EQ@93..94 "=" WHITESPACE@92..93 " "
WHITESPACE@94..95 " " EQ@93..94 "="
STRING@95..102 "\"hello\"" WHITESPACE@94..95 " "
COMMA@102..103 "," STRING@95..102 "\"hello\""
WHITESPACE@103..104 " " COMMA@102..103 ","
IDENT@104..109 "ident" WHITESPACE@103..104 " "
TOKEN_TREE@109..114 IDENT@104..109 "ident"
L_PAREN@109..110 "(" TOKEN_TREE@109..114
INT_NUMBER@110..113 "100" L_PAREN@109..110 "("
R_PAREN@113..114 ")" INT_NUMBER@110..113 "100"
R_PAREN@114..115 ")" R_PAREN@113..114 ")"
R_PAREN@114..115 ")"
R_BRACK@115..116 "]" R_BRACK@115..116 "]"
WHITESPACE@116..117 "\n" WHITESPACE@116..117 "\n"
ATTR@117..130 ATTR@117..130
POUND@117..118 "#" POUND@117..118 "#"
BANG@118..119 "!" BANG@118..119 "!"
L_BRACK@119..120 "[" L_BRACK@119..120 "["
PATH@120..124 META@120..129
PATH_SEGMENT@120..124 PATH@120..124
NAME_REF@120..124 PATH_SEGMENT@120..124
IDENT@120..124 "attr" NAME_REF@120..124
TOKEN_TREE@124..129 IDENT@120..124 "attr"
L_PAREN@124..125 "(" TOKEN_TREE@124..129
INT_NUMBER@125..128 "100" L_PAREN@124..125 "("
R_PAREN@128..129 ")" INT_NUMBER@125..128 "100"
R_PAREN@128..129 ")"
R_BRACK@129..130 "]" R_BRACK@129..130 "]"
WHITESPACE@130..131 "\n" WHITESPACE@130..131 "\n"
ATTR@131..155 ATTR@131..155
POUND@131..132 "#" POUND@131..132 "#"
BANG@132..133 "!" BANG@132..133 "!"
L_BRACK@133..134 "[" L_BRACK@133..134 "["
PATH@134..138 META@134..154
PATH_SEGMENT@134..138 PATH@134..138
NAME_REF@134..138 PATH_SEGMENT@134..138
IDENT@134..138 "attr" NAME_REF@134..138
TOKEN_TREE@138..154 IDENT@134..138 "attr"
L_PAREN@138..139 "(" TOKEN_TREE@138..154
IDENT@139..146 "enabled" L_PAREN@138..139 "("
WHITESPACE@146..147 " " IDENT@139..146 "enabled"
EQ@147..148 "=" WHITESPACE@146..147 " "
WHITESPACE@148..149 " " EQ@147..148 "="
TRUE_KW@149..153 "true" WHITESPACE@148..149 " "
R_PAREN@153..154 ")" TRUE_KW@149..153 "true"
R_PAREN@153..154 ")"
R_BRACK@154..155 "]" R_BRACK@154..155 "]"
WHITESPACE@155..156 "\n" WHITESPACE@155..156 "\n"
ATTR@156..173 ATTR@156..173
POUND@156..157 "#" POUND@156..157 "#"
BANG@157..158 "!" BANG@157..158 "!"
L_BRACK@158..159 "[" L_BRACK@158..159 "["
PATH@159..166 META@159..172
PATH_SEGMENT@159..166 PATH@159..166
NAME_REF@159..166 PATH_SEGMENT@159..166
IDENT@159..166 "enabled" NAME_REF@159..166
TOKEN_TREE@166..172 IDENT@159..166 "enabled"
L_PAREN@166..167 "(" TOKEN_TREE@166..172
TRUE_KW@167..171 "true" L_PAREN@166..167 "("
R_PAREN@171..172 ")" TRUE_KW@167..171 "true"
R_PAREN@171..172 ")"
R_BRACK@172..173 "]" R_BRACK@172..173 "]"
WHITESPACE@173..174 "\n" WHITESPACE@173..174 "\n"
ATTR@174..191 ATTR@174..191
POUND@174..175 "#" POUND@174..175 "#"
BANG@175..176 "!" BANG@175..176 "!"
L_BRACK@176..177 "[" L_BRACK@176..177 "["
PATH@177..181 META@177..190
PATH_SEGMENT@177..181 PATH@177..181
NAME_REF@177..181 PATH_SEGMENT@177..181
IDENT@177..181 "attr" NAME_REF@177..181
TOKEN_TREE@181..190 IDENT@177..181 "attr"
L_PAREN@181..182 "(" TOKEN_TREE@181..190
STRING@182..189 "\"hello\"" L_PAREN@181..182 "("
R_PAREN@189..190 ")" STRING@182..189 "\"hello\""
R_PAREN@189..190 ")"
R_BRACK@190..191 "]" R_BRACK@190..191 "]"
WHITESPACE@191..192 "\n" WHITESPACE@191..192 "\n"
ATTR@192..214 ATTR@192..214
POUND@192..193 "#" POUND@192..193 "#"
BANG@193..194 "!" BANG@193..194 "!"
L_BRACK@194..195 "[" L_BRACK@194..195 "["
PATH@195..199 META@195..213
PATH_SEGMENT@195..199 PATH@195..199
NAME_REF@195..199 PATH_SEGMENT@195..199
IDENT@195..199 "repr" NAME_REF@195..199
TOKEN_TREE@199..213 IDENT@195..199 "repr"
L_PAREN@199..200 "(" TOKEN_TREE@199..213
IDENT@200..201 "C" L_PAREN@199..200 "("
COMMA@201..202 "," IDENT@200..201 "C"
WHITESPACE@202..203 " " COMMA@201..202 ","
IDENT@203..208 "align" WHITESPACE@202..203 " "
WHITESPACE@208..209 " " IDENT@203..208 "align"
EQ@209..210 "=" WHITESPACE@208..209 " "
WHITESPACE@210..211 " " EQ@209..210 "="
INT_NUMBER@211..212 "4" WHITESPACE@210..211 " "
R_PAREN@212..213 ")" INT_NUMBER@211..212 "4"
R_PAREN@212..213 ")"
R_BRACK@213..214 "]" R_BRACK@213..214 "]"
WHITESPACE@214..215 "\n" WHITESPACE@214..215 "\n"
ATTR@215..236 ATTR@215..236
POUND@215..216 "#" POUND@215..216 "#"
BANG@216..217 "!" BANG@216..217 "!"
L_BRACK@217..218 "[" L_BRACK@217..218 "["
PATH@218..222 META@218..235
PATH_SEGMENT@218..222 PATH@218..222
NAME_REF@218..222 PATH_SEGMENT@218..222
IDENT@218..222 "repr" NAME_REF@218..222
TOKEN_TREE@222..235 IDENT@218..222 "repr"
L_PAREN@222..223 "(" TOKEN_TREE@222..235
IDENT@223..224 "C" L_PAREN@222..223 "("
COMMA@224..225 "," IDENT@223..224 "C"
WHITESPACE@225..226 " " COMMA@224..225 ","
IDENT@226..231 "align" WHITESPACE@225..226 " "
TOKEN_TREE@231..234 IDENT@226..231 "align"
L_PAREN@231..232 "(" TOKEN_TREE@231..234
INT_NUMBER@232..233 "4" L_PAREN@231..232 "("
R_PAREN@233..234 ")" INT_NUMBER@232..233 "4"
R_PAREN@234..235 ")" R_PAREN@233..234 ")"
R_PAREN@234..235 ")"
R_BRACK@235..236 "]" R_BRACK@235..236 "]"

View file

@ -65,10 +65,11 @@ SOURCE_FILE@0..118
POUND@79..80 "#" POUND@79..80 "#"
BANG@80..81 "!" BANG@80..81 "!"
L_BRACK@81..82 "[" L_BRACK@81..82 "["
PATH@82..86 META@82..86
PATH_SEGMENT@82..86 PATH@82..86
NAME_REF@82..86 PATH_SEGMENT@82..86
IDENT@82..86 "attr" NAME_REF@82..86
IDENT@82..86 "attr"
R_BRACK@86..87 "]" R_BRACK@86..87 "]"
WHITESPACE@87..92 "\n " WHITESPACE@87..92 "\n "
MODULE@92..98 MODULE@92..98

View file

@ -3,23 +3,25 @@ SOURCE_FILE@0..60
ATTR@0..12 ATTR@0..12
POUND@0..1 "#" POUND@0..1 "#"
L_BRACK@1..2 "[" L_BRACK@1..2 "["
PATH@2..5 META@2..11
PATH_SEGMENT@2..5 PATH@2..5
NAME_REF@2..5 PATH_SEGMENT@2..5
IDENT@2..5 "cfg" NAME_REF@2..5
TOKEN_TREE@5..11 IDENT@2..5 "cfg"
L_PAREN@5..6 "(" TOKEN_TREE@5..11
IDENT@6..10 "test" L_PAREN@5..6 "("
R_PAREN@10..11 ")" IDENT@6..10 "test"
R_PAREN@10..11 ")"
R_BRACK@11..12 "]" R_BRACK@11..12 "]"
WHITESPACE@12..13 "\n" WHITESPACE@12..13 "\n"
ATTR@13..22 ATTR@13..22
POUND@13..14 "#" POUND@13..14 "#"
L_BRACK@14..15 "[" L_BRACK@14..15 "["
PATH@15..21 META@15..21
PATH_SEGMENT@15..21 PATH@15..21
NAME_REF@15..21 PATH_SEGMENT@15..21
IDENT@15..21 "ignore" NAME_REF@15..21
IDENT@15..21 "ignore"
R_BRACK@21..22 "]" R_BRACK@21..22 "]"
WHITESPACE@22..23 "\n" WHITESPACE@22..23 "\n"
FN_KW@23..25 "fn" FN_KW@23..25 "fn"
@ -38,15 +40,16 @@ SOURCE_FILE@0..60
ATTR@36..52 ATTR@36..52
POUND@36..37 "#" POUND@36..37 "#"
L_BRACK@37..38 "[" L_BRACK@37..38 "["
PATH@38..42 META@38..51
PATH_SEGMENT@38..42 PATH@38..42
NAME_REF@38..42 PATH_SEGMENT@38..42
IDENT@38..42 "path" NAME_REF@38..42
WHITESPACE@42..43 " " IDENT@38..42 "path"
EQ@43..44 "=" WHITESPACE@42..43 " "
WHITESPACE@44..45 " " EQ@43..44 "="
LITERAL@45..51 WHITESPACE@44..45 " "
STRING@45..51 "\"a.rs\"" LITERAL@45..51
STRING@45..51 "\"a.rs\""
R_BRACK@51..52 "]" R_BRACK@51..52 "]"
WHITESPACE@52..53 "\n" WHITESPACE@52..53 "\n"
MOD_KW@53..56 "mod" MOD_KW@53..56 "mod"

View file

@ -3,15 +3,16 @@ SOURCE_FILE@0..23
ATTR@0..10 ATTR@0..10
POUND@0..1 "#" POUND@0..1 "#"
L_BRACK@1..2 "[" L_BRACK@1..2 "["
PATH@2..5 META@2..9
PATH_SEGMENT@2..5 PATH@2..5
NAME_REF@2..5 PATH_SEGMENT@2..5
IDENT@2..5 "foo" NAME_REF@2..5
TOKEN_TREE@5..9 IDENT@2..5 "foo"
L_PAREN@5..6 "(" TOKEN_TREE@5..9
IDENT@6..7 "a" L_PAREN@5..6 "("
COMMA@7..8 "," IDENT@6..7 "a"
R_PAREN@8..9 ")" COMMA@7..8 ","
R_PAREN@8..9 ")"
R_BRACK@9..10 "]" R_BRACK@9..10 "]"
WHITESPACE@10..11 "\n" WHITESPACE@10..11 "\n"
FN_KW@11..13 "fn" FN_KW@11..13 "fn"

View file

@ -11,71 +11,76 @@ SOURCE_FILE@0..3813
POUND@271..272 "#" POUND@271..272 "#"
BANG@272..273 "!" BANG@272..273 "!"
L_BRACK@273..274 "[" L_BRACK@273..274 "["
PATH@274..279 META@274..301
PATH_SEGMENT@274..279 PATH@274..279
NAME_REF@274..279 PATH_SEGMENT@274..279
IDENT@274..279 "allow" NAME_REF@274..279
TOKEN_TREE@279..301 IDENT@274..279 "allow"
L_PAREN@279..280 "(" TOKEN_TREE@279..301
IDENT@280..300 "non_camel_case_types" L_PAREN@279..280 "("
R_PAREN@300..301 ")" IDENT@280..300 "non_camel_case_types"
R_PAREN@300..301 ")"
R_BRACK@301..302 "]" R_BRACK@301..302 "]"
WHITESPACE@302..303 "\n" WHITESPACE@302..303 "\n"
ATTR@303..323 ATTR@303..323
POUND@303..304 "#" POUND@303..304 "#"
BANG@304..305 "!" BANG@304..305 "!"
L_BRACK@305..306 "[" L_BRACK@305..306 "["
PATH@306..311 META@306..322
PATH_SEGMENT@306..311 PATH@306..311
NAME_REF@306..311 PATH_SEGMENT@306..311
IDENT@306..311 "allow" NAME_REF@306..311
TOKEN_TREE@311..322 IDENT@306..311 "allow"
L_PAREN@311..312 "(" TOKEN_TREE@311..322
IDENT@312..321 "dead_code" L_PAREN@311..312 "("
R_PAREN@321..322 ")" IDENT@312..321 "dead_code"
R_PAREN@321..322 ")"
R_BRACK@322..323 "]" R_BRACK@322..323 "]"
WHITESPACE@323..324 "\n" WHITESPACE@323..324 "\n"
ATTR@324..351 ATTR@324..351
POUND@324..325 "#" POUND@324..325 "#"
BANG@325..326 "!" BANG@325..326 "!"
L_BRACK@326..327 "[" L_BRACK@326..327 "["
PATH@327..332 META@327..350
PATH_SEGMENT@327..332 PATH@327..332
NAME_REF@327..332 PATH_SEGMENT@327..332
IDENT@327..332 "allow" NAME_REF@327..332
TOKEN_TREE@332..350 IDENT@327..332 "allow"
L_PAREN@332..333 "(" TOKEN_TREE@332..350
IDENT@333..349 "unreachable_code" L_PAREN@332..333 "("
R_PAREN@349..350 ")" IDENT@333..349 "unreachable_code"
R_PAREN@349..350 ")"
R_BRACK@350..351 "]" R_BRACK@350..351 "]"
WHITESPACE@351..352 "\n" WHITESPACE@351..352 "\n"
ATTR@352..376 ATTR@352..376
POUND@352..353 "#" POUND@352..353 "#"
BANG@353..354 "!" BANG@353..354 "!"
L_BRACK@354..355 "[" L_BRACK@354..355 "["
PATH@355..360 META@355..375
PATH_SEGMENT@355..360 PATH@355..360
NAME_REF@355..360 PATH_SEGMENT@355..360
IDENT@355..360 "allow" NAME_REF@355..360
TOKEN_TREE@360..375 IDENT@355..360 "allow"
L_PAREN@360..361 "(" TOKEN_TREE@360..375
IDENT@361..374 "unused_parens" L_PAREN@360..361 "("
R_PAREN@374..375 ")" IDENT@361..374 "unused_parens"
R_PAREN@374..375 ")"
R_BRACK@375..376 "]" R_BRACK@375..376 "]"
WHITESPACE@376..378 "\n\n" WHITESPACE@376..378 "\n\n"
ATTR@378..405 ATTR@378..405
POUND@378..379 "#" POUND@378..379 "#"
BANG@379..380 "!" BANG@379..380 "!"
L_BRACK@380..381 "[" L_BRACK@380..381 "["
PATH@381..396 META@381..404
PATH_SEGMENT@381..396 PATH@381..396
NAME_REF@381..396 PATH_SEGMENT@381..396
IDENT@381..396 "recursion_limit" NAME_REF@381..396
WHITESPACE@396..397 " " IDENT@381..396 "recursion_limit"
EQ@397..398 "=" WHITESPACE@396..397 " "
WHITESPACE@398..399 " " EQ@397..398 "="
LITERAL@399..404 WHITESPACE@398..399 " "
STRING@399..404 "\"128\"" LITERAL@399..404
STRING@399..404 "\"128\""
R_BRACK@404..405 "]" R_BRACK@404..405 "]"
WHITESPACE@405..407 "\n\n" WHITESPACE@405..407 "\n\n"
USE@407..427 USE@407..427

View file

@ -17,18 +17,19 @@ SOURCE_FILE@0..166
ATTR@77..106 ATTR@77..106
POUND@77..78 "#" POUND@77..78 "#"
L_BRACK@78..79 "[" L_BRACK@78..79 "["
PATH@79..82 META@79..105
PATH_SEGMENT@79..82 PATH@79..82
NAME_REF@79..82 PATH_SEGMENT@79..82
IDENT@79..82 "cfg" NAME_REF@79..82
TOKEN_TREE@82..105 IDENT@79..82 "cfg"
L_PAREN@82..83 "(" TOKEN_TREE@82..105
IDENT@83..90 "feature" L_PAREN@82..83 "("
WHITESPACE@90..91 " " IDENT@83..90 "feature"
EQ@91..92 "=" WHITESPACE@90..91 " "
WHITESPACE@92..93 " " EQ@91..92 "="
STRING@93..104 "\"backtrace\"" WHITESPACE@92..93 " "
R_PAREN@104..105 ")" STRING@93..104 "\"backtrace\""
R_PAREN@104..105 ")"
R_BRACK@105..106 "]" R_BRACK@105..106 "]"
WHITESPACE@106..111 "\n " WHITESPACE@106..111 "\n "
LET_KW@111..114 "let" LET_KW@111..114 "let"

View file

@ -15,14 +15,15 @@ SOURCE_FILE@0..764
POUND@17..18 "#" POUND@17..18 "#"
BANG@18..19 "!" BANG@18..19 "!"
L_BRACK@19..20 "[" L_BRACK@19..20 "["
PATH@20..23 META@20..56
PATH_SEGMENT@20..23 PATH@20..23
NAME_REF@20..23 PATH_SEGMENT@20..23
IDENT@20..23 "doc" NAME_REF@20..23
TOKEN_TREE@23..56 IDENT@20..23 "doc"
L_PAREN@23..24 "(" TOKEN_TREE@23..56
STRING@24..55 "\"Inner attributes all ..." L_PAREN@23..24 "("
R_PAREN@55..56 ")" STRING@24..55 "\"Inner attributes all ..."
R_PAREN@55..56 ")"
R_BRACK@56..57 "]" R_BRACK@56..57 "]"
WHITESPACE@57..62 "\n " WHITESPACE@57..62 "\n "
COMMENT@62..97 "//! As are ModuleDoc ..." COMMENT@62..97 "//! As are ModuleDoc ..."
@ -35,28 +36,30 @@ SOURCE_FILE@0..764
POUND@112..113 "#" POUND@112..113 "#"
BANG@113..114 "!" BANG@113..114 "!"
L_BRACK@114..115 "[" L_BRACK@114..115 "["
PATH@115..118 META@115..179
PATH_SEGMENT@115..118 PATH@115..118
NAME_REF@115..118 PATH_SEGMENT@115..118
IDENT@115..118 "doc" NAME_REF@115..118
TOKEN_TREE@118..179 IDENT@115..118 "doc"
L_PAREN@118..119 "(" TOKEN_TREE@118..179
STRING@119..178 "\"Inner attributes are ..." L_PAREN@118..119 "("
R_PAREN@178..179 ")" STRING@119..178 "\"Inner attributes are ..."
R_PAREN@178..179 ")"
R_BRACK@179..180 "]" R_BRACK@179..180 "]"
WHITESPACE@180..189 "\n " WHITESPACE@180..189 "\n "
ATTR@189..244 ATTR@189..244
POUND@189..190 "#" POUND@189..190 "#"
BANG@190..191 "!" BANG@190..191 "!"
L_BRACK@191..192 "[" L_BRACK@191..192 "["
PATH@192..195 META@192..243
PATH_SEGMENT@192..195 PATH@192..195
NAME_REF@192..195 PATH_SEGMENT@192..195
IDENT@192..195 "doc" NAME_REF@192..195
TOKEN_TREE@195..243 IDENT@192..195 "doc"
L_PAREN@195..196 "(" TOKEN_TREE@195..243
STRING@196..242 "\"Being validated is n ..." L_PAREN@195..196 "("
R_PAREN@242..243 ")" STRING@196..242 "\"Being validated is n ..."
R_PAREN@242..243 ")"
R_BRACK@243..244 "]" R_BRACK@243..244 "]"
WHITESPACE@244..253 "\n " WHITESPACE@244..253 "\n "
COMMENT@253..288 "//! As are ModuleDoc ..." COMMENT@253..288 "//! As are ModuleDoc ..."
@ -71,14 +74,15 @@ SOURCE_FILE@0..764
POUND@310..311 "#" POUND@310..311 "#"
BANG@311..312 "!" BANG@311..312 "!"
L_BRACK@312..313 "[" L_BRACK@312..313 "["
PATH@313..316 META@313..408
PATH_SEGMENT@313..316 PATH@313..316
NAME_REF@313..316 PATH_SEGMENT@313..316
IDENT@313..316 "doc" NAME_REF@313..316
TOKEN_TREE@316..408 IDENT@313..316 "doc"
L_PAREN@316..317 "(" TOKEN_TREE@316..408
STRING@317..407 "\"Inner attributes are ..." L_PAREN@316..317 "("
R_PAREN@407..408 ")" STRING@317..407 "\"Inner attributes are ..."
R_PAREN@407..408 ")"
R_BRACK@408..409 "]" R_BRACK@408..409 "]"
WHITESPACE@409..418 "\n " WHITESPACE@409..418 "\n "
COMMENT@418..453 "//! As are ModuleDoc ..." COMMENT@418..453 "//! As are ModuleDoc ..."
@ -111,14 +115,15 @@ SOURCE_FILE@0..764
ATTR@488..533 ATTR@488..533
POUND@488..489 "#" POUND@488..489 "#"
L_BRACK@489..490 "[" L_BRACK@489..490 "["
PATH@490..493 META@490..532
PATH_SEGMENT@490..493 PATH@490..493
NAME_REF@490..493 PATH_SEGMENT@490..493
IDENT@490..493 "doc" NAME_REF@490..493
TOKEN_TREE@493..532 IDENT@490..493 "doc"
L_PAREN@493..494 "(" TOKEN_TREE@493..532
STRING@494..531 "\"Outer attributes are ..." L_PAREN@493..494 "("
R_PAREN@531..532 ")" STRING@494..531 "\"Outer attributes are ..."
R_PAREN@531..532 ")"
R_BRACK@532..533 "]" R_BRACK@532..533 "]"
WHITESPACE@533..534 " " WHITESPACE@533..534 " "
L_CURLY@534..535 "{" L_CURLY@534..535 "{"
@ -200,14 +205,15 @@ SOURCE_FILE@0..764
POUND@690..691 "#" POUND@690..691 "#"
BANG@691..692 "!" BANG@691..692 "!"
L_BRACK@692..693 "[" L_BRACK@692..693 "["
PATH@693..698 META@693..716
PATH_SEGMENT@693..698 PATH@693..698
NAME_REF@693..698 PATH_SEGMENT@693..698
IDENT@693..698 "allow" NAME_REF@693..698
TOKEN_TREE@698..716 IDENT@693..698 "allow"
L_PAREN@698..699 "(" TOKEN_TREE@698..716
IDENT@699..715 "unused_variables" L_PAREN@698..699 "("
R_PAREN@715..716 ")" IDENT@699..715 "unused_variables"
R_PAREN@715..716 ")"
R_BRACK@716..717 "]" R_BRACK@716..717 "]"
WHITESPACE@717..718 " " WHITESPACE@717..718 " "
COMMENT@718..755 "// this is `inner_at ..." COMMENT@718..755 "// this is `inner_at ..."

View file

@ -14,14 +14,15 @@ SOURCE_FILE@0..87
POUND@47..48 "#" POUND@47..48 "#"
BANG@48..49 "!" BANG@48..49 "!"
L_BRACK@49..50 "[" L_BRACK@49..50 "["
PATH@50..53 META@50..83
PATH_SEGMENT@50..53 PATH@50..53
NAME_REF@50..53 PATH_SEGMENT@50..53
IDENT@50..53 "doc" NAME_REF@50..53
TOKEN_TREE@53..83 IDENT@50..53 "doc"
L_PAREN@53..54 "(" TOKEN_TREE@53..83
STRING@54..82 "\"This is also a doc c ..." L_PAREN@53..54 "("
R_PAREN@82..83 ")" STRING@54..82 "\"This is also a doc c ..."
R_PAREN@82..83 ")"
R_BRACK@83..84 "]" R_BRACK@83..84 "]"
WHITESPACE@84..85 "\n" WHITESPACE@84..85 "\n"
R_CURLY@85..86 "}" R_CURLY@85..86 "}"

View file

@ -10,19 +10,21 @@ SOURCE_FILE@0..519
ATTR@6..14 ATTR@6..14
POUND@6..7 "#" POUND@6..7 "#"
L_BRACK@7..8 "[" L_BRACK@7..8 "["
PATH@8..13 META@8..13
PATH_SEGMENT@8..13 PATH@8..13
NAME_REF@8..13 PATH_SEGMENT@8..13
IDENT@8..13 "attr1" NAME_REF@8..13
IDENT@8..13 "attr1"
R_BRACK@13..14 "]" R_BRACK@13..14 "]"
WHITESPACE@14..15 " " WHITESPACE@14..15 " "
ATTR@15..23 ATTR@15..23
POUND@15..16 "#" POUND@15..16 "#"
L_BRACK@16..17 "[" L_BRACK@16..17 "["
PATH@17..22 META@17..22
PATH_SEGMENT@17..22 PATH@17..22
NAME_REF@17..22 PATH_SEGMENT@17..22
IDENT@17..22 "attr2" NAME_REF@17..22
IDENT@17..22 "attr2"
R_BRACK@22..23 "]" R_BRACK@22..23 "]"
WHITESPACE@23..24 " " WHITESPACE@23..24 " "
IDENT_PAT@24..27 IDENT_PAT@24..27
@ -52,10 +54,11 @@ SOURCE_FILE@0..519
ATTR@44..52 ATTR@44..52
POUND@44..45 "#" POUND@44..45 "#"
L_BRACK@45..46 "[" L_BRACK@45..46 "["
PATH@46..51 META@46..51
PATH_SEGMENT@46..51 PATH@46..51
NAME_REF@46..51 PATH_SEGMENT@46..51
IDENT@46..51 "attr1" NAME_REF@46..51
IDENT@46..51 "attr1"
R_BRACK@51..52 "]" R_BRACK@51..52 "]"
WHITESPACE@52..53 " " WHITESPACE@52..53 " "
IDENT_PAT@53..54 IDENT_PAT@53..54
@ -111,10 +114,11 @@ SOURCE_FILE@0..519
ATTR@106..113 ATTR@106..113
POUND@106..107 "#" POUND@106..107 "#"
L_BRACK@107..108 "[" L_BRACK@107..108 "["
PATH@108..112 META@108..112
PATH_SEGMENT@108..112 PATH@108..112
NAME_REF@108..112 PATH_SEGMENT@108..112
IDENT@108..112 "attr" NAME_REF@108..112
IDENT@108..112 "attr"
R_BRACK@112..113 "]" R_BRACK@112..113 "]"
WHITESPACE@113..114 " " WHITESPACE@113..114 " "
DOT3@114..117 "..." DOT3@114..117 "..."
@ -157,10 +161,11 @@ SOURCE_FILE@0..519
ATTR@146..153 ATTR@146..153
POUND@146..147 "#" POUND@146..147 "#"
L_BRACK@147..148 "[" L_BRACK@147..148 "["
PATH@148..152 META@148..152
PATH_SEGMENT@148..152 PATH@148..152
NAME_REF@148..152 PATH_SEGMENT@148..152
IDENT@148..152 "attr" NAME_REF@148..152
IDENT@148..152 "attr"
R_BRACK@152..153 "]" R_BRACK@152..153 "]"
WHITESPACE@153..154 " " WHITESPACE@153..154 " "
REF_TYPE@154..166 REF_TYPE@154..166
@ -207,10 +212,11 @@ SOURCE_FILE@0..519
ATTR@197..204 ATTR@197..204
POUND@197..198 "#" POUND@197..198 "#"
L_BRACK@198..199 "[" L_BRACK@198..199 "["
PATH@199..203 META@199..203
PATH_SEGMENT@199..203 PATH@199..203
NAME_REF@199..203 PATH_SEGMENT@199..203
IDENT@199..203 "attr" NAME_REF@199..203
IDENT@199..203 "attr"
R_BRACK@203..204 "]" R_BRACK@203..204 "]"
WHITESPACE@204..205 " " WHITESPACE@204..205 " "
WILDCARD_PAT@205..206 WILDCARD_PAT@205..206
@ -229,10 +235,11 @@ SOURCE_FILE@0..519
POUND@213..214 "#" POUND@213..214 "#"
WHITESPACE@214..215 " " WHITESPACE@214..215 " "
L_BRACK@215..216 "[" L_BRACK@215..216 "["
PATH@216..220 META@216..220
PATH_SEGMENT@216..220 PATH@216..220
NAME_REF@216..220 PATH_SEGMENT@216..220
IDENT@216..220 "attr" NAME_REF@216..220
IDENT@216..220 "attr"
R_BRACK@220..221 "]" R_BRACK@220..221 "]"
WHITESPACE@221..222 " " WHITESPACE@221..222 " "
IDENT_PAT@222..227 IDENT_PAT@222..227
@ -275,10 +282,11 @@ SOURCE_FILE@0..519
ATTR@257..268 ATTR@257..268
POUND@257..258 "#" POUND@257..258 "#"
L_BRACK@258..259 "[" L_BRACK@258..259 "["
PATH@259..267 META@259..267
PATH_SEGMENT@259..267 PATH@259..267
NAME_REF@259..267 PATH_SEGMENT@259..267
IDENT@259..267 "must_use" NAME_REF@259..267
IDENT@259..267 "must_use"
R_BRACK@267..268 "]" R_BRACK@267..268 "]"
WHITESPACE@268..269 " " WHITESPACE@268..269 " "
NAME@269..273 NAME@269..273
@ -300,10 +308,11 @@ SOURCE_FILE@0..519
ATTR@289..296 ATTR@289..296
POUND@289..290 "#" POUND@289..290 "#"
L_BRACK@290..291 "[" L_BRACK@290..291 "["
PATH@291..295 META@291..295
PATH_SEGMENT@291..295 PATH@291..295
NAME_REF@291..295 PATH_SEGMENT@291..295
IDENT@291..295 "attr" NAME_REF@291..295
IDENT@291..295 "attr"
R_BRACK@295..296 "]" R_BRACK@295..296 "]"
WHITESPACE@296..297 " " WHITESPACE@296..297 " "
NAME@297..301 NAME@297..301
@ -325,10 +334,11 @@ SOURCE_FILE@0..519
ATTR@317..324 ATTR@317..324
POUND@317..318 "#" POUND@317..318 "#"
L_BRACK@318..319 "[" L_BRACK@318..319 "["
PATH@319..323 META@319..323
PATH_SEGMENT@319..323 PATH@319..323
NAME_REF@319..323 PATH_SEGMENT@319..323
IDENT@319..323 "attr" NAME_REF@319..323
IDENT@319..323 "attr"
R_BRACK@323..324 "]" R_BRACK@323..324 "]"
WHITESPACE@324..325 " " WHITESPACE@324..325 " "
AMP@325..326 "&" AMP@325..326 "&"
@ -357,10 +367,11 @@ SOURCE_FILE@0..519
ATTR@350..357 ATTR@350..357
POUND@350..351 "#" POUND@350..351 "#"
L_BRACK@351..352 "[" L_BRACK@351..352 "["
PATH@352..356 META@352..356
PATH_SEGMENT@352..356 PATH@352..356
NAME_REF@352..356 PATH_SEGMENT@352..356
IDENT@352..356 "attr" NAME_REF@352..356
IDENT@352..356 "attr"
R_BRACK@356..357 "]" R_BRACK@356..357 "]"
WHITESPACE@357..358 " " WHITESPACE@357..358 " "
AMP@358..359 "&" AMP@358..359 "&"
@ -391,10 +402,11 @@ SOURCE_FILE@0..519
ATTR@387..394 ATTR@387..394
POUND@387..388 "#" POUND@387..388 "#"
L_BRACK@388..389 "[" L_BRACK@388..389 "["
PATH@389..393 META@389..393
PATH_SEGMENT@389..393 PATH@389..393
NAME_REF@389..393 PATH_SEGMENT@389..393
IDENT@389..393 "attr" NAME_REF@389..393
IDENT@389..393 "attr"
R_BRACK@393..394 "]" R_BRACK@393..394 "]"
WHITESPACE@394..395 " " WHITESPACE@394..395 " "
AMP@395..396 "&" AMP@395..396 "&"
@ -426,10 +438,11 @@ SOURCE_FILE@0..519
ATTR@423..430 ATTR@423..430
POUND@423..424 "#" POUND@423..424 "#"
L_BRACK@424..425 "[" L_BRACK@424..425 "["
PATH@425..429 META@425..429
PATH_SEGMENT@425..429 PATH@425..429
NAME_REF@425..429 PATH_SEGMENT@425..429
IDENT@425..429 "attr" NAME_REF@425..429
IDENT@425..429 "attr"
R_BRACK@429..430 "]" R_BRACK@429..430 "]"
WHITESPACE@430..431 " " WHITESPACE@430..431 " "
AMP@431..432 "&" AMP@431..432 "&"
@ -457,10 +470,11 @@ SOURCE_FILE@0..519
ATTR@458..465 ATTR@458..465
POUND@458..459 "#" POUND@458..459 "#"
L_BRACK@459..460 "[" L_BRACK@459..460 "["
PATH@460..464 META@460..464
PATH_SEGMENT@460..464 PATH@460..464
NAME_REF@460..464 PATH_SEGMENT@460..464
IDENT@460..464 "attr" NAME_REF@460..464
IDENT@460..464 "attr"
R_BRACK@464..465 "]" R_BRACK@464..465 "]"
WHITESPACE@465..466 " " WHITESPACE@465..466 " "
NAME@466..470 NAME@466..470
@ -489,10 +503,11 @@ SOURCE_FILE@0..519
ATTR@491..498 ATTR@491..498
POUND@491..492 "#" POUND@491..492 "#"
L_BRACK@492..493 "[" L_BRACK@492..493 "["
PATH@493..497 META@493..497
PATH_SEGMENT@493..497 PATH@493..497
NAME_REF@493..497 PATH_SEGMENT@493..497
IDENT@493..497 "attr" NAME_REF@493..497
IDENT@493..497 "attr"
R_BRACK@497..498 "]" R_BRACK@497..498 "]"
WHITESPACE@498..499 " " WHITESPACE@498..499 " "
NAME@499..503 NAME@499..503

View file

@ -5,10 +5,11 @@ SOURCE_FILE@0..65
ATTR@14..29 ATTR@14..29
POUND@14..15 "#" POUND@14..15 "#"
L_BRACK@15..16 "[" L_BRACK@15..16 "["
PATH@16..28 META@16..28
PATH_SEGMENT@16..28 PATH@16..28
NAME_REF@16..28 PATH_SEGMENT@16..28
IDENT@16..28 "macro_export" NAME_REF@16..28
IDENT@16..28 "macro_export"
R_BRACK@28..29 "]" R_BRACK@28..29 "]"
WHITESPACE@29..30 "\n" WHITESPACE@29..30 "\n"
MACRO_RULES_KW@30..41 "macro_rules" MACRO_RULES_KW@30..41 "macro_rules"

View file

@ -55,10 +55,11 @@ SOURCE_FILE@0..349
ATTR@95..102 ATTR@95..102
POUND@95..96 "#" POUND@95..96 "#"
L_BRACK@96..97 "[" L_BRACK@96..97 "["
PATH@97..101 META@97..101
PATH_SEGMENT@97..101 PATH@97..101
NAME_REF@97..101 PATH_SEGMENT@97..101
IDENT@97..101 "test" NAME_REF@97..101
IDENT@97..101 "test"
R_BRACK@101..102 "]" R_BRACK@101..102 "]"
WHITESPACE@102..103 "\n" WHITESPACE@102..103 "\n"
FN_KW@103..105 "fn" FN_KW@103..105 "fn"

View file

@ -96,14 +96,15 @@ SOURCE_FILE@0..126
ATTR@92..105 ATTR@92..105
POUND@92..93 "#" POUND@92..93 "#"
L_BRACK@93..94 "[" L_BRACK@93..94 "["
PATH@94..97 META@94..104
PATH_SEGMENT@94..97 PATH@94..97
NAME_REF@94..97 PATH_SEGMENT@94..97
IDENT@94..97 "cfg" NAME_REF@94..97
TOKEN_TREE@97..104 IDENT@94..97 "cfg"
L_PAREN@97..98 "(" TOKEN_TREE@97..104
IDENT@98..103 "never" L_PAREN@97..98 "("
R_PAREN@103..104 ")" IDENT@98..103 "never"
R_PAREN@103..104 ")"
R_BRACK@104..105 "]" R_BRACK@104..105 "]"
WHITESPACE@105..106 " " WHITESPACE@105..106 " "
SLICE_PAT@106..115 SLICE_PAT@106..115

View file

@ -11,7 +11,7 @@ anyhow = "1.0.26"
flate2 = "1.0" flate2 = "1.0"
proc-macro2 = "1.0.8" proc-macro2 = "1.0.8"
quote = "1.0.2" quote = "1.0.2"
ungrammar = "=1.13" ungrammar = "=1.14"
walkdir = "2.3.1" walkdir = "2.3.1"
write-json = "0.1.0" write-json = "0.1.0"
xshell = "0.1" xshell = "0.1"

View file

@ -184,7 +184,7 @@ pub(crate) const KINDS_SRC: KindsSrc = KindsSrc {
"ITEM_LIST", "ITEM_LIST",
"ASSOC_ITEM_LIST", "ASSOC_ITEM_LIST",
"ATTR", "ATTR",
"META_ITEM", // not an item actually "META",
"USE_TREE", "USE_TREE",
"USE_TREE_LIST", "USE_TREE_LIST",
"PATH", "PATH",