WebAssembly / spec

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

[text format] Should `else id? instr*` be optional in `if` instructions? #1569

Closed tlively closed 1 year ago

tlively commented 1 year ago

The else branch is optional in the folded abbreviation and even in the binary format, but surprisingly it appears to be mandatory in the unabbreviated text format.

rossberg commented 1 year ago

The optional form is allowed, but defined as an abbreviation below, since the abstract syntax does not treat that case specially.

tlively commented 1 year ago

Ah, I missed that abbreviation. Thanks!