Skip to content

Allow trailing comma in use-names-list - #714

Merged
lukewagner merged 1 commit into
WebAssembly:mainfrom
eamonburns:patch-1
Aug 28, 2026
Merged

Allow trailing comma in use-names-list#714
lukewagner merged 1 commit into
WebAssembly:mainfrom
eamonburns:patch-1

Conversation

@eamonburns

Copy link
Copy Markdown
Contributor

Fixes #713

Allow trailing comma in use-names-list to be consistent with other constructs (e.g. include-names-list, record-fields)

use types.{
  foo,
  bar as baz,
  quux,
};

This was an easy-to-miss sidenote, and was essentially an exception to the grammar as written. If trailing commas are meant to be explicitly forbidden, it could more easily be written as one of the following:

use-names-list ::= use-names-item
                 | use-names-item ',' use-names-list

use-names-list ::= use-names-item (',' use-names-item)*

Related: #586

@eamonburns

Copy link
Copy Markdown
Contributor Author

It doesn't look like I can add people as reviewers, but @lukewagner mentioned being willing to review.

@lukewagner

Copy link
Copy Markdown
Member

Thanks! Checking in wasm-tools just now, it matches the EBNF, so I guess it is just deleting the misleading line.

@lukewagner
lukewagner merged commit 50a1ab9 into WebAssembly:main Aug 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

confusion with use-names-list?

2 participants