diff --git a/src/syntax.grammar b/src/syntax.grammar index aa12222..2642d28 100644 --- a/src/syntax.grammar +++ b/src/syntax.grammar @@ -39,6 +39,7 @@ declaration[@isGroup=Declaration] | EntityTypeDeclaration | ConstraintDeclaration | ModuleDeclaration + | NamespaceDeclaration | WithUseDeclaration } @@ -97,6 +98,10 @@ ModuleDeclaration { Docstring? Annotation* kw<"module"> LhsId formalsBracket* declaration* kw<"end"> } +NamespaceDeclaration { + Docstring? Annotation* kw<"namespace"> LhsId formalsBracket* declaration* kw<"end"> +} + WithUseDeclaration { kw<"with"> expression kw<"use"> ("..." | commaSep1) } @@ -436,6 +441,7 @@ formalsParen { "(" Formals? ")" } | ":>" | "<++" | "++>" + | "++" } decimalLiteral { $[0-9]+ }