Skip to content

Commit 7677319

Browse files
authored
Fix resource-decl rule in grammar.
Allow for `resource x;` in the grammar (a resource with no constructor or methods).
1 parent b41f683 commit 7677319

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

LANGUAGE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ world-include-item ::= id 'as' id
471471
world-ref ::= package-path | id
472472
type-decl ::= variant-decl | record-decl | flags-decl | enum-decl | type-alias
473473
item-type-decl ::= resource-decl | type-decl
474-
resource-decl ::= 'resource' id '{' resource-item* '}'
474+
resource-decl ::= 'resource' id (';' | '{' resource-item* '}')
475475
resource-item ::= constructor | method
476476
constructor ::= 'constructor' param-list ';'
477477
method ::= id ':' 'static'? func-type ';'

0 commit comments

Comments
 (0)