diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-06-11 17:35:38 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-06-11 17:35:38 +0100 |
commit | 6ac3e666b7c62a9097d10c52636cfe75e7851806 (patch) | |
tree | b1e4ab548d425287b2e5c74bbb16f8ce0da96e97 /crates/parser | |
parent | 5f69420ee3317f9c0e3cb774ccc0cb0e64af0b9a (diff) | |
parent | 99d40e7a3a22604690753322f9274bc91fa03de4 (diff) |
Merge #9217
9217: internal: Don't stringify and reparse `cfg_attr`-gated attributes r=jonas-schievink a=jonas-schievink
Bumps ungrammar to include https://github.com/rust-analyzer/ungrammar/pull/33
bors r+
Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/parser')
-rw-r--r-- | crates/parser/src/grammar/attributes.rs | 3 | ||||
-rw-r--r-- | crates/parser/src/syntax_kind/generated.rs | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/crates/parser/src/grammar/attributes.rs b/crates/parser/src/grammar/attributes.rs index b8242cd2f..a44c5e484 100644 --- a/crates/parser/src/grammar/attributes.rs +++ b/crates/parser/src/grammar/attributes.rs | |||
@@ -13,6 +13,7 @@ pub(super) fn outer_attrs(p: &mut Parser) { | |||
13 | } | 13 | } |
14 | 14 | ||
15 | pub(super) fn meta(p: &mut Parser) { | 15 | pub(super) fn meta(p: &mut Parser) { |
16 | let meta = p.start(); | ||
16 | paths::use_path(p); | 17 | paths::use_path(p); |
17 | 18 | ||
18 | match p.current() { | 19 | match p.current() { |
@@ -25,6 +26,8 @@ pub(super) fn meta(p: &mut Parser) { | |||
25 | T!['('] | T!['['] | T!['{'] => items::token_tree(p), | 26 | T!['('] | T!['['] | T!['{'] => items::token_tree(p), |
26 | _ => {} | 27 | _ => {} |
27 | } | 28 | } |
29 | |||
30 | meta.complete(p, META); | ||
28 | } | 31 | } |
29 | 32 | ||
30 | fn attr(p: &mut Parser, inner: bool) { | 33 | fn attr(p: &mut Parser, inner: bool) { |
diff --git a/crates/parser/src/syntax_kind/generated.rs b/crates/parser/src/syntax_kind/generated.rs index bcefd183a..5f10b82de 100644 --- a/crates/parser/src/syntax_kind/generated.rs +++ b/crates/parser/src/syntax_kind/generated.rs | |||
@@ -220,7 +220,7 @@ pub enum SyntaxKind { | |||
220 | ITEM_LIST, | 220 | ITEM_LIST, |
221 | ASSOC_ITEM_LIST, | 221 | ASSOC_ITEM_LIST, |
222 | ATTR, | 222 | ATTR, |
223 | META_ITEM, | 223 | META, |
224 | USE_TREE, | 224 | USE_TREE, |
225 | USE_TREE_LIST, | 225 | USE_TREE_LIST, |
226 | PATH, | 226 | PATH, |