Skip to content

Commit ca34dcc

Browse files
committed
Also make world items gate-able
1 parent a6c9c98 commit ca34dcc

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

design/mvp/WIT.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -945,14 +945,21 @@ nesting both namespaces and packages, which would then generalize the syntax of
945945

946946
## Item: `world`
947947

948-
Worlds define a [componenttype](https://github.com/WebAssembly/component-model/blob/main/design/mvp/Explainer.md#type-definitions) as a collection of imports and exports.
948+
Worlds define a [`componenttype`] as a collection of imports and exports, all
949+
of which can be gated.
949950

950951
Concretely, the structure of a world is:
951952

952953
```ebnf
953954
world-item ::= gate 'world' id '{' world-items* '}'
954955
955-
world-items ::= export-item | import-item | use-item | typedef-item | include-item
956+
world-items ::= gate world-definition
957+
958+
world-definition ::= export-item
959+
| import-item
960+
| use-item
961+
| typedef-item
962+
| include-item
956963
957964
export-item ::= 'export' id ':' extern-type
958965
| 'export' use-path ';'
@@ -967,6 +974,8 @@ from the root of a component and used within functions imported and exported.
967974
The `interface` item here additionally defines the grammar for IDs used to refer
968975
to `interface` items.
969976

977+
[`componenttype`]: Explainer.md#type-definitions
978+
970979
## Item: `include`
971980

972981
A `include` statement enables the union of the current world with another world. The structure of an `include` statement is:

0 commit comments

Comments
 (0)