Finish Module grammar

This commit is contained in:
Aleksey Kladov 2020-07-30 11:44:22 +02:00
parent 081f35fe1b
commit 7d09e5ed61
2 changed files with 2 additions and 1 deletions

View file

@ -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<SyntaxToken> { support::token(&self.syntax, T!['{']) }

View file

@ -24,7 +24,7 @@ Module =
(ItemList | ';')
ItemList =
'{' Item* '}'
'{' Attr* Item* '}'
FnDef =
Attr* Visibility? Abi? 'const' 'default' 'async' 'unsafe' 'fn' Name TypeParamList?