From 7d09e5ed618b9b9d6e00b57b24db0b9c8a8c12d7 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 11:44:22 +0200 Subject: [PATCH] Finish Module grammar --- crates/ra_syntax/src/ast/generated/nodes.rs | 1 + xtask/src/codegen/rust.ungram | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs index 7ccb7ea7fa..fbf3b457a9 100644 --- a/crates/ra_syntax/src/ast/generated/nodes.rs +++ b/crates/ra_syntax/src/ast/generated/nodes.rs @@ -248,6 +248,7 @@ impl Name { pub struct ItemList { pub(crate) syntax: SyntaxNode, } +impl ast::AttrsOwner for ItemList {} impl ast::ModuleItemOwner for ItemList {} impl ItemList { pub fn l_curly_token(&self) -> Option { support::token(&self.syntax, T!['{']) } diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram index d0518ceadf..470ac8c8ff 100644 --- a/xtask/src/codegen/rust.ungram +++ b/xtask/src/codegen/rust.ungram @@ -24,7 +24,7 @@ Module = (ItemList | ';') ItemList = - '{' Item* '}' + '{' Attr* Item* '}' FnDef = Attr* Visibility? Abi? 'const' 'default' 'async' 'unsafe' 'fn' Name TypeParamList?