WebAssembly / component-model

Repository for design and specification of the Component Model
Other
947 stars 79 forks source link

WIT.md resource-method func-item expansion results in double semi colon #267

Closed patrickhuber closed 11 months ago

patrickhuber commented 11 months ago

Looking at the resource-method definition and func-item definition in the WIT.md, expanding the 'func-item' case results in the application of a double semi colon:

resource-method ::= func-item ';'
                  | id ':' 'static' func-type ';'
                  | 'constructor' param-list ';'

func-item ::= id ':' func-type ';'

I believe the resource-method definition should be changed to the following to avoid this as the func-item brings its own semi colon

resource-method ::= func-item
                  | id ':' 'static' func-type ';'
                  | 'constructor' param-list ';'

func-item ::= id ':' func-type ';'
alexcrichton commented 11 months ago

Thanks for spotting this! I've posted https://github.com/WebAssembly/component-model/pull/268 with the fix you suggested.

lukewagner commented 11 months ago

Good catch!