WebAssembly / component-model

Repository for design and specification of the Component Model
Other
914 stars 78 forks source link

add use-path grammar #245

Closed cardoso closed 10 months ago

cardoso commented 10 months ago

This seems to be missing from #174 . I just took a rough look at wit-parser and this seems to be what it's doing currently.

cc @Mossaka @alexcrichton

cardoso commented 10 months ago

@alexcrichton can it take the version as well? The parser accepts it, but I didn't see ui tests for it. If the parser is right, I can improve this and add more tests there.

alexcrichton commented 10 months ago

It can, yeah, and would be good to add tests as well!

cardoso commented 10 months ago

Okay, so it seems they're the same:

interface ::= id
            | id ':' id '/' id ('@' valid-semver)?

If this is it, then I'll open the PR for the parser once this is merged.

cardoso commented 10 months ago

It does seem confusing though since it should refer to worlds, but I'll leave it to you.

cardoso commented 10 months ago

Thanks @alexcrichton . I think it reads better now (and uses the same naming as wit-parser).

lukewagner commented 10 months ago

Thanks!