From 87c8d43d11cd1e70396c05629c20ab42f402e2bc Mon Sep 17 00:00:00 2001 From: John Date: Mon, 26 Feb 2024 16:19:21 -0600 Subject: [PATCH] grammar.ebnf: Fix ModuleKind grammar --- grammar.ebnf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grammar.ebnf b/grammar.ebnf index decd643..0125e17 100644 --- a/grammar.ebnf +++ b/grammar.ebnf @@ -19,8 +19,8 @@ Const = "const" Identifier ':' Type = Expr ';' ; Static = "static" Mutability Identifier ':' Type = Expr ';' ; -Module = "mod" Identifier '{' (Item)* '}' ; -ModuleKind = (Item+)? ; +Module = "mod" Identifier ModuleKind ; +ModuleKind = '{' Item* '}' | ';' ; Function = "fn" Identifier '(' (Param ',')* Param? ')' ('->' Type)? Block? ; Param = Mutability Identifier ':' Type ;