From 76773195f7a875778e43a8da040a94efa292b1e5 Mon Sep 17 00:00:00 2001 From: Peter Huene Date: Sat, 27 Apr 2024 19:12:27 -0700 Subject: [PATCH] Fix `resource-decl` rule in grammar. Allow for `resource x;` in the grammar (a resource with no constructor or methods). --- LANGUAGE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LANGUAGE.md b/LANGUAGE.md index a75ba69..712f357 100644 --- a/LANGUAGE.md +++ b/LANGUAGE.md @@ -471,7 +471,7 @@ world-include-item ::= id 'as' id world-ref ::= package-path | id type-decl ::= variant-decl | record-decl | flags-decl | enum-decl | type-alias item-type-decl ::= resource-decl | type-decl -resource-decl ::= 'resource' id '{' resource-item* '}' +resource-decl ::= 'resource' id (';' | '{' resource-item* '}') resource-item ::= constructor | method constructor ::= 'constructor' param-list ';' method ::= id ':' 'static'? func-type ';'