WebAssembly / spec

WebAssembly specification, reference interpreter, and test suite.
https://webassembly.github.io/spec/
Other
3.13k stars 445 forks source link

Missing `id?` in func specification. #1661

Closed ToebiasHT closed 1 year ago

ToebiasHT commented 1 year ago

This is how the spec defines functions in text format:

functype ::= '(' 'func' t1:vec(param) t2:vec(result) ')'

It should be like:

functype ::= '(' 'func' id? t1:vec(param) t2:vec(result) ')'

To show that functions can be named as well.

funcdef

rossberg commented 1 year ago

That is the grammar for function types. The grammar for function definitions is here.