Skip to content

Are zero-length import groups allowed in text format? #22

Description

@chacailline

Hi,

I can see that import groups with empty lists are allowed in the binary format.

To me, it looks like the text format grammar, allows empty lists. I'm not a SpecTec expert, but looking at the source, I don't see any rules that would disallow them.

However, in #17, it seems like it's not intended for the text format to recognize empty groups.

Currently, the reference interpreter rejects empty lists in compact encoding 1, but not in compact encoding 2.

❯ ./interpreter/wasm -e '(module (import "mod"))'
string:1.22-1.23: syntax error: unexpected token
❯

❯ ./interpreter/wasm -e '(module (import "mod" (func)))'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions