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]]
name = "ungrammar"
version = "1.13.0"
version = "1.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76760314176cc2b94047af2f921b92c39f11a34dc05c43a3c2b0fc91cb22959f"
checksum = "50ef6d7335c77ec3e4a7c4be74c2b9e4642569e94a4004c836f8cca71fede3a7"
[[package]]
name = "unicase"

View file

@ -208,7 +208,7 @@ pub(crate) fn hover(
}
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()?;
if !tt.syntax().text_range().contains(token.text_range().start()) {
return None;

View file

@ -369,7 +369,7 @@ impl NameRefClass {
}
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 func.attrs(sema.db).by_key("proc_macro_attribute").exists() {
return Some(NameRefClass::Definition(resolved.into()));

View file

@ -1846,6 +1846,7 @@ fn test_no_space_after_semi_colon() {
ATTR@0..21
POUND@0..1 "#"
L_BRACK@1..2 "["
META@2..20
PATH@2..5
PATH_SEGMENT@2..5
NAME_REF@2..5
@ -1865,6 +1866,7 @@ fn test_no_space_after_semi_colon() {
ATTR@26..47
POUND@26..27 "#"
L_BRACK@27..28 "["
META@28..46
PATH@28..31
PATH_SEGMENT@28..31
NAME_REF@28..31

View file

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

View file

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

View file

@ -150,10 +150,7 @@ impl Attr {
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 l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
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) }
pub fn meta(&self) -> Option<Meta> { support::child(&self.syntax) }
pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@ -632,6 +629,16 @@ impl WherePred {
pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
}
#[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(crate) syntax: SyntaxNode,
}
@ -2072,6 +2079,17 @@ impl AstNode for WherePred {
}
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 {
fn can_cast(kind: SyntaxKind) -> bool { kind == EXPR_STMT }
fn cast(syntax: SyntaxNode) -> Option<Self> {
@ -3887,6 +3905,11 @@ impl std::fmt::Display for WherePred {
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 {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
std::fmt::Display::fmt(self.syntax(), f)

View file

@ -144,19 +144,20 @@ impl AttrKind {
impl ast::Attr {
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;
}
self.simple_name()
}
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))
}
pub fn simple_name(&self) -> Option<SmolStr> {
let path = self.path()?;
let path = self.meta()?.path()?;
match (path.segment(), path.qualifier()) {
(Some(segment), None) => Some(segment.syntax().first_token()?.text().into()),
_ => None,
@ -174,6 +175,18 @@ impl ast::Attr {
_ => 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)]

View file

@ -3,6 +3,7 @@ SOURCE_FILE@0..54
ATTR@0..18
POUND@0..1 "#"
L_BRACK@1..2 "["
META@2..17
PATH@2..5
PATH_SEGMENT@2..5
NAME_REF@2..5
@ -35,6 +36,7 @@ SOURCE_FILE@0..54
ATTR@34..53
POUND@34..35 "#"
L_BRACK@35..36 "["
META@36..53
PATH@36..39
PATH_SEGMENT@36..39
NAME_REF@36..39

View file

@ -27,6 +27,7 @@ SOURCE_FILE@0..350
POUND@39..40 "#"
BANG@40..41 "!"
L_BRACK@41..42 "["
META@42..82
PATH@42..45
PATH_SEGMENT@42..45
NAME_REF@42..45
@ -57,6 +58,7 @@ SOURCE_FILE@0..350
POUND@152..153 "#"
BANG@153..154 "!"
L_BRACK@154..155 "["
META@155..170
PATH@155..158
PATH_SEGMENT@155..158
NAME_REF@155..158
@ -71,6 +73,7 @@ SOURCE_FILE@0..350
POUND@180..181 "#"
BANG@181..182 "!"
L_BRACK@182..183 "["
META@183..211
PATH@183..186
PATH_SEGMENT@183..186
NAME_REF@183..186
@ -99,6 +102,7 @@ SOURCE_FILE@0..350
POUND@283..284 "#"
BANG@284..285 "!"
L_BRACK@285..286 "["
META@286..301
PATH@286..289
PATH_SEGMENT@286..289
NAME_REF@286..289

View file

@ -135,6 +135,7 @@ SOURCE_FILE@0..293
ATTR@210..222
POUND@210..211 "#"
L_BRACK@211..212 "["
META@212..221
PATH@212..215
PATH_SEGMENT@212..215
NAME_REF@212..215

View file

@ -47,6 +47,7 @@ SOURCE_FILE@0..89
ATTR@68..80
POUND@68..69 "#"
L_BRACK@69..70 "["
META@70..79
PATH@70..73
PATH_SEGMENT@70..73
NAME_REF@70..73

View file

@ -15,6 +15,7 @@ SOURCE_FILE@0..48
ATTR@14..18
POUND@14..15 "#"
L_BRACK@15..16 "["
META@16..17
PATH@16..17
PATH_SEGMENT@16..17
NAME_REF@16..17
@ -35,6 +36,7 @@ SOURCE_FILE@0..48
ATTR@29..33
POUND@29..30 "#"
L_BRACK@30..31 "["
META@31..32
PATH@31..32
PATH_SEGMENT@31..32
NAME_REF@31..32

View file

@ -12,6 +12,7 @@ SOURCE_FILE@0..64
ATTR@15..43
POUND@15..16 "#"
L_BRACK@16..17 "["
META@17..42
PATH@17..22
PATH_SEGMENT@17..22
NAME_REF@17..22

View file

@ -12,6 +12,7 @@ SOURCE_FILE@0..60
ATTR@15..43
POUND@15..16 "#"
L_BRACK@16..17 "["
META@17..42
PATH@17..22
PATH_SEGMENT@17..22
NAME_REF@17..22

View file

@ -26,6 +26,7 @@ SOURCE_FILE@0..94
POUND@54..55 "#"
BANG@55..56 "!"
L_BRACK@56..57 "["
META@57..90
PATH@57..60
PATH_SEGMENT@57..60
NAME_REF@57..60

View file

@ -25,6 +25,7 @@ SOURCE_FILE@0..139
POUND@34..35 "#"
BANG@35..36 "!"
L_BRACK@36..37 "["
META@37..59
PATH@37..40
PATH_SEGMENT@37..40
NAME_REF@37..40
@ -39,6 +40,7 @@ SOURCE_FILE@0..139
POUND@69..70 "#"
BANG@70..71 "!"
L_BRACK@71..72 "["
META@72..85
PATH@72..75
PATH_SEGMENT@72..75
NAME_REF@72..75
@ -53,6 +55,7 @@ SOURCE_FILE@0..139
POUND@95..96 "#"
BANG@96..97 "!"
L_BRACK@97..98 "["
META@98..112
PATH@98..101
PATH_SEGMENT@98..101
NAME_REF@98..101

View file

@ -25,6 +25,7 @@ SOURCE_FILE@0..259
ATTR@34..58
POUND@34..35 "#"
L_BRACK@35..36 "["
META@36..57
PATH@36..39
PATH_SEGMENT@36..39
NAME_REF@36..39
@ -53,6 +54,7 @@ SOURCE_FILE@0..259
ATTR@84..109
POUND@84..85 "#"
L_BRACK@85..86 "["
META@86..108
PATH@86..89
PATH_SEGMENT@86..89
NAME_REF@86..89
@ -81,6 +83,7 @@ SOURCE_FILE@0..259
ATTR@135..159
POUND@135..136 "#"
L_BRACK@136..137 "["
META@137..158
PATH@137..140
PATH_SEGMENT@137..140
NAME_REF@137..140
@ -98,6 +101,7 @@ SOURCE_FILE@0..259
ATTR@168..198
POUND@168..169 "#"
L_BRACK@169..170 "["
META@170..197
PATH@170..173
PATH_SEGMENT@170..173
NAME_REF@170..173
@ -115,6 +119,7 @@ SOURCE_FILE@0..259
ATTR@207..233
POUND@207..208 "#"
L_BRACK@208..209 "["
META@209..232
PATH@209..212
PATH_SEGMENT@209..212
NAME_REF@209..212

View file

@ -10,6 +10,7 @@ SOURCE_FILE@0..64
ATTR@7..26
POUND@7..8 "#"
L_BRACK@8..9 "["
META@9..25
PATH@9..15
PATH_SEGMENT@9..15
NAME_REF@9..15
@ -28,6 +29,7 @@ SOURCE_FILE@0..64
ATTR@31..46
POUND@31..32 "#"
L_BRACK@32..33 "["
META@33..45
PATH@33..39
PATH_SEGMENT@33..39
NAME_REF@33..39

View file

@ -24,6 +24,7 @@ SOURCE_FILE@0..46
ATTR@20..32
POUND@20..21 "#"
L_BRACK@21..22 "["
META@22..31
PATH@22..25
PATH_SEGMENT@22..25
NAME_REF@22..25

View file

@ -15,6 +15,7 @@ SOURCE_FILE@0..82
ATTR@15..19
POUND@15..16 "#"
L_BRACK@16..17 "["
META@17..18
PATH@17..18
PATH_SEGMENT@17..18
NAME_REF@17..18
@ -36,6 +37,7 @@ SOURCE_FILE@0..82
ATTR@31..35
POUND@31..32 "#"
L_BRACK@32..33 "["
META@33..34
PATH@33..34
PATH_SEGMENT@33..34
NAME_REF@33..34
@ -56,6 +58,7 @@ SOURCE_FILE@0..82
ATTR@47..51
POUND@47..48 "#"
L_BRACK@48..49 "["
META@49..50
PATH@49..50
PATH_SEGMENT@49..50
NAME_REF@49..50
@ -65,6 +68,7 @@ SOURCE_FILE@0..82
ATTR@52..56
POUND@52..53 "#"
L_BRACK@53..54 "["
META@54..55
PATH@54..55
PATH_SEGMENT@54..55
NAME_REF@54..55
@ -79,6 +83,7 @@ SOURCE_FILE@0..82
ATTR@64..68
POUND@64..65 "#"
L_BRACK@65..66 "["
META@66..67
PATH@66..67
PATH_SEGMENT@66..67
NAME_REF@66..67

View file

@ -19,6 +19,7 @@ SOURCE_FILE@0..47
ATTR@17..21
POUND@17..18 "#"
L_BRACK@18..19 "["
META@19..20
PATH@19..20
PATH_SEGMENT@19..20
NAME_REF@19..20
@ -42,6 +43,7 @@ SOURCE_FILE@0..47
ATTR@36..40
POUND@36..37 "#"
L_BRACK@37..38 "["
META@38..39
PATH@38..39
PATH_SEGMENT@38..39
NAME_REF@38..39

View file

@ -109,6 +109,7 @@ SOURCE_FILE@0..135
ATTR@120..127
POUND@120..121 "#"
L_BRACK@121..122 "["
META@122..126
PATH@122..126
PATH_SEGMENT@122..126
NAME_REF@122..126

View file

@ -10,6 +10,7 @@ SOURCE_FILE@0..26
ATTR@5..16
POUND@5..6 "#"
L_BRACK@6..7 "["
META@7..15
PATH@7..15
PATH_SEGMENT@7..15
NAME_REF@7..15

View file

@ -10,6 +10,7 @@ SOURCE_FILE@0..28
ATTR@5..13
POUND@5..6 "#"
L_BRACK@6..7 "["
META@7..12
PATH@7..12
PATH_SEGMENT@7..12
NAME_REF@7..12

View file

@ -87,6 +87,7 @@ SOURCE_FILE@0..102
ATTR@73..86
POUND@73..74 "#"
L_BRACK@74..75 "["
META@75..85
PATH@75..78
PATH_SEGMENT@75..78
NAME_REF@75..78

View file

@ -31,6 +31,7 @@ SOURCE_FILE@0..40
ATTR@23..35
POUND@23..24 "#"
L_BRACK@24..25 "["
META@25..34
PATH@25..28
PATH_SEGMENT@25..28
NAME_REF@25..28

View file

@ -23,6 +23,7 @@ SOURCE_FILE@0..34
ATTR@20..27
POUND@20..21 "#"
L_BRACK@21..22 "["
META@22..26
PATH@22..26
PATH_SEGMENT@22..26
NAME_REF@22..26

View file

@ -34,6 +34,7 @@ SOURCE_FILE@0..43
ATTR@26..38
POUND@26..27 "#"
L_BRACK@27..28 "["
META@28..37
PATH@28..31
PATH_SEGMENT@28..31
NAME_REF@28..31

View file

@ -3,6 +3,7 @@ SOURCE_FILE@0..236
POUND@0..1 "#"
BANG@1..2 "!"
L_BRACK@2..3 "["
META@3..7
PATH@3..7
PATH_SEGMENT@3..7
NAME_REF@3..7
@ -13,6 +14,7 @@ SOURCE_FILE@0..236
POUND@9..10 "#"
BANG@10..11 "!"
L_BRACK@11..12 "["
META@12..22
PATH@12..16
PATH_SEGMENT@12..16
NAME_REF@12..16
@ -27,6 +29,7 @@ SOURCE_FILE@0..236
POUND@24..25 "#"
BANG@25..26 "!"
L_BRACK@26..27 "["
META@27..38
PATH@27..31
PATH_SEGMENT@27..31
NAME_REF@27..31
@ -41,6 +44,7 @@ SOURCE_FILE@0..236
POUND@40..41 "#"
BANG@41..42 "!"
L_BRACK@42..43 "["
META@43..115
PATH@43..47
PATH_SEGMENT@43..47
NAME_REF@43..47
@ -85,6 +89,7 @@ SOURCE_FILE@0..236
POUND@117..118 "#"
BANG@118..119 "!"
L_BRACK@119..120 "["
META@120..129
PATH@120..124
PATH_SEGMENT@120..124
NAME_REF@120..124
@ -99,6 +104,7 @@ SOURCE_FILE@0..236
POUND@131..132 "#"
BANG@132..133 "!"
L_BRACK@133..134 "["
META@134..154
PATH@134..138
PATH_SEGMENT@134..138
NAME_REF@134..138
@ -117,6 +123,7 @@ SOURCE_FILE@0..236
POUND@156..157 "#"
BANG@157..158 "!"
L_BRACK@158..159 "["
META@159..172
PATH@159..166
PATH_SEGMENT@159..166
NAME_REF@159..166
@ -131,6 +138,7 @@ SOURCE_FILE@0..236
POUND@174..175 "#"
BANG@175..176 "!"
L_BRACK@176..177 "["
META@177..190
PATH@177..181
PATH_SEGMENT@177..181
NAME_REF@177..181
@ -145,6 +153,7 @@ SOURCE_FILE@0..236
POUND@192..193 "#"
BANG@193..194 "!"
L_BRACK@194..195 "["
META@195..213
PATH@195..199
PATH_SEGMENT@195..199
NAME_REF@195..199
@ -166,6 +175,7 @@ SOURCE_FILE@0..236
POUND@215..216 "#"
BANG@216..217 "!"
L_BRACK@217..218 "["
META@218..235
PATH@218..222
PATH_SEGMENT@218..222
NAME_REF@218..222

View file

@ -65,6 +65,7 @@ SOURCE_FILE@0..118
POUND@79..80 "#"
BANG@80..81 "!"
L_BRACK@81..82 "["
META@82..86
PATH@82..86
PATH_SEGMENT@82..86
NAME_REF@82..86

View file

@ -3,6 +3,7 @@ SOURCE_FILE@0..60
ATTR@0..12
POUND@0..1 "#"
L_BRACK@1..2 "["
META@2..11
PATH@2..5
PATH_SEGMENT@2..5
NAME_REF@2..5
@ -16,6 +17,7 @@ SOURCE_FILE@0..60
ATTR@13..22
POUND@13..14 "#"
L_BRACK@14..15 "["
META@15..21
PATH@15..21
PATH_SEGMENT@15..21
NAME_REF@15..21
@ -38,6 +40,7 @@ SOURCE_FILE@0..60
ATTR@36..52
POUND@36..37 "#"
L_BRACK@37..38 "["
META@38..51
PATH@38..42
PATH_SEGMENT@38..42
NAME_REF@38..42

View file

@ -3,6 +3,7 @@ SOURCE_FILE@0..23
ATTR@0..10
POUND@0..1 "#"
L_BRACK@1..2 "["
META@2..9
PATH@2..5
PATH_SEGMENT@2..5
NAME_REF@2..5

View file

@ -11,6 +11,7 @@ SOURCE_FILE@0..3813
POUND@271..272 "#"
BANG@272..273 "!"
L_BRACK@273..274 "["
META@274..301
PATH@274..279
PATH_SEGMENT@274..279
NAME_REF@274..279
@ -25,6 +26,7 @@ SOURCE_FILE@0..3813
POUND@303..304 "#"
BANG@304..305 "!"
L_BRACK@305..306 "["
META@306..322
PATH@306..311
PATH_SEGMENT@306..311
NAME_REF@306..311
@ -39,6 +41,7 @@ SOURCE_FILE@0..3813
POUND@324..325 "#"
BANG@325..326 "!"
L_BRACK@326..327 "["
META@327..350
PATH@327..332
PATH_SEGMENT@327..332
NAME_REF@327..332
@ -53,6 +56,7 @@ SOURCE_FILE@0..3813
POUND@352..353 "#"
BANG@353..354 "!"
L_BRACK@354..355 "["
META@355..375
PATH@355..360
PATH_SEGMENT@355..360
NAME_REF@355..360
@ -67,6 +71,7 @@ SOURCE_FILE@0..3813
POUND@378..379 "#"
BANG@379..380 "!"
L_BRACK@380..381 "["
META@381..404
PATH@381..396
PATH_SEGMENT@381..396
NAME_REF@381..396

View file

@ -17,6 +17,7 @@ SOURCE_FILE@0..166
ATTR@77..106
POUND@77..78 "#"
L_BRACK@78..79 "["
META@79..105
PATH@79..82
PATH_SEGMENT@79..82
NAME_REF@79..82

View file

@ -15,6 +15,7 @@ SOURCE_FILE@0..764
POUND@17..18 "#"
BANG@18..19 "!"
L_BRACK@19..20 "["
META@20..56
PATH@20..23
PATH_SEGMENT@20..23
NAME_REF@20..23
@ -35,6 +36,7 @@ SOURCE_FILE@0..764
POUND@112..113 "#"
BANG@113..114 "!"
L_BRACK@114..115 "["
META@115..179
PATH@115..118
PATH_SEGMENT@115..118
NAME_REF@115..118
@ -49,6 +51,7 @@ SOURCE_FILE@0..764
POUND@189..190 "#"
BANG@190..191 "!"
L_BRACK@191..192 "["
META@192..243
PATH@192..195
PATH_SEGMENT@192..195
NAME_REF@192..195
@ -71,6 +74,7 @@ SOURCE_FILE@0..764
POUND@310..311 "#"
BANG@311..312 "!"
L_BRACK@312..313 "["
META@313..408
PATH@313..316
PATH_SEGMENT@313..316
NAME_REF@313..316
@ -111,6 +115,7 @@ SOURCE_FILE@0..764
ATTR@488..533
POUND@488..489 "#"
L_BRACK@489..490 "["
META@490..532
PATH@490..493
PATH_SEGMENT@490..493
NAME_REF@490..493
@ -200,6 +205,7 @@ SOURCE_FILE@0..764
POUND@690..691 "#"
BANG@691..692 "!"
L_BRACK@692..693 "["
META@693..716
PATH@693..698
PATH_SEGMENT@693..698
NAME_REF@693..698

View file

@ -14,6 +14,7 @@ SOURCE_FILE@0..87
POUND@47..48 "#"
BANG@48..49 "!"
L_BRACK@49..50 "["
META@50..83
PATH@50..53
PATH_SEGMENT@50..53
NAME_REF@50..53

View file

@ -10,6 +10,7 @@ SOURCE_FILE@0..519
ATTR@6..14
POUND@6..7 "#"
L_BRACK@7..8 "["
META@8..13
PATH@8..13
PATH_SEGMENT@8..13
NAME_REF@8..13
@ -19,6 +20,7 @@ SOURCE_FILE@0..519
ATTR@15..23
POUND@15..16 "#"
L_BRACK@16..17 "["
META@17..22
PATH@17..22
PATH_SEGMENT@17..22
NAME_REF@17..22
@ -52,6 +54,7 @@ SOURCE_FILE@0..519
ATTR@44..52
POUND@44..45 "#"
L_BRACK@45..46 "["
META@46..51
PATH@46..51
PATH_SEGMENT@46..51
NAME_REF@46..51
@ -111,6 +114,7 @@ SOURCE_FILE@0..519
ATTR@106..113
POUND@106..107 "#"
L_BRACK@107..108 "["
META@108..112
PATH@108..112
PATH_SEGMENT@108..112
NAME_REF@108..112
@ -157,6 +161,7 @@ SOURCE_FILE@0..519
ATTR@146..153
POUND@146..147 "#"
L_BRACK@147..148 "["
META@148..152
PATH@148..152
PATH_SEGMENT@148..152
NAME_REF@148..152
@ -207,6 +212,7 @@ SOURCE_FILE@0..519
ATTR@197..204
POUND@197..198 "#"
L_BRACK@198..199 "["
META@199..203
PATH@199..203
PATH_SEGMENT@199..203
NAME_REF@199..203
@ -229,6 +235,7 @@ SOURCE_FILE@0..519
POUND@213..214 "#"
WHITESPACE@214..215 " "
L_BRACK@215..216 "["
META@216..220
PATH@216..220
PATH_SEGMENT@216..220
NAME_REF@216..220
@ -275,6 +282,7 @@ SOURCE_FILE@0..519
ATTR@257..268
POUND@257..258 "#"
L_BRACK@258..259 "["
META@259..267
PATH@259..267
PATH_SEGMENT@259..267
NAME_REF@259..267
@ -300,6 +308,7 @@ SOURCE_FILE@0..519
ATTR@289..296
POUND@289..290 "#"
L_BRACK@290..291 "["
META@291..295
PATH@291..295
PATH_SEGMENT@291..295
NAME_REF@291..295
@ -325,6 +334,7 @@ SOURCE_FILE@0..519
ATTR@317..324
POUND@317..318 "#"
L_BRACK@318..319 "["
META@319..323
PATH@319..323
PATH_SEGMENT@319..323
NAME_REF@319..323
@ -357,6 +367,7 @@ SOURCE_FILE@0..519
ATTR@350..357
POUND@350..351 "#"
L_BRACK@351..352 "["
META@352..356
PATH@352..356
PATH_SEGMENT@352..356
NAME_REF@352..356
@ -391,6 +402,7 @@ SOURCE_FILE@0..519
ATTR@387..394
POUND@387..388 "#"
L_BRACK@388..389 "["
META@389..393
PATH@389..393
PATH_SEGMENT@389..393
NAME_REF@389..393
@ -426,6 +438,7 @@ SOURCE_FILE@0..519
ATTR@423..430
POUND@423..424 "#"
L_BRACK@424..425 "["
META@425..429
PATH@425..429
PATH_SEGMENT@425..429
NAME_REF@425..429
@ -457,6 +470,7 @@ SOURCE_FILE@0..519
ATTR@458..465
POUND@458..459 "#"
L_BRACK@459..460 "["
META@460..464
PATH@460..464
PATH_SEGMENT@460..464
NAME_REF@460..464
@ -489,6 +503,7 @@ SOURCE_FILE@0..519
ATTR@491..498
POUND@491..492 "#"
L_BRACK@492..493 "["
META@493..497
PATH@493..497
PATH_SEGMENT@493..497
NAME_REF@493..497

View file

@ -5,6 +5,7 @@ SOURCE_FILE@0..65
ATTR@14..29
POUND@14..15 "#"
L_BRACK@15..16 "["
META@16..28
PATH@16..28
PATH_SEGMENT@16..28
NAME_REF@16..28

View file

@ -55,6 +55,7 @@ SOURCE_FILE@0..349
ATTR@95..102
POUND@95..96 "#"
L_BRACK@96..97 "["
META@97..101
PATH@97..101
PATH_SEGMENT@97..101
NAME_REF@97..101

View file

@ -96,6 +96,7 @@ SOURCE_FILE@0..126
ATTR@92..105
POUND@92..93 "#"
L_BRACK@93..94 "["
META@94..104
PATH@94..97
PATH_SEGMENT@94..97
NAME_REF@94..97

View file

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

View file

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