Skip to content

Commit 3b50ef1

Browse files
committed
Update text encoding for new abbreviation
1 parent 3c9766e commit 3b50ef1

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

document/core/text/modules.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,11 @@ Abbreviations
359359

360360
Multiple imports with the same ${:nm_1} may be declared together:
361361

362-
$${grammar: Timports_/abbrev}
362+
$${grammar: Timports_/abbrev-compact1}
363+
364+
Multiple imports with the same ${:nm_1} and ${:xt} may also be declared together, in which case identifiers may be placed on individual items instead of the ${:externtype}:
365+
366+
$${grammar: Timports_/abbrev-compact2}
363367

364368
Imports may also be specified inline with
365369
:ref:`tag <text-tag>`,

specification/wasm-3.0/6.3-text.modules.spectec

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,14 @@ grammar Timport_(I)/plain : (import, idctxt) =
134134
| "(" "import" nm_1:Tname nm_2:Tname (xt,I'):Texterntype_(I) ")" => (IMPORT nm_1 nm_2 xt, I')
135135
| ...
136136

137-
grammar Timports_(I)/abbrev : (import*, idctxt) =
137+
grammar Timports_(I)/abbrev-compact1 : (import*, idctxt) =
138138
| "(" "import" nm_1:Tname ("(" "item" nm_2:Tname Texterntype_(I) ")")* ")" ==
139139
("(" "import" nm_1:Tname nm_2:Tname Texterntype_(I) ")")*
140+
| ...
141+
142+
grammar Timports_(I)/abbrev-compact2 : (import*, idctxt) = ...
143+
| "(" "import" nm_1:Tname "(" "type" Texterntype_(I) ("(" "item" id?:Tid? nm_2:Tname ")")* ")" ")" ==
144+
("(" "import" nm_1:Tname nm_2:Tname Texterntype_(I) ")")*
140145

141146
grammar Timport_(I)/abbrev-tag : (import, idctxt) = ...
142147
| "(" "tag" Tid? "(" "import" Tname^2 ")" Ttagtype_(I) ")" ==

0 commit comments

Comments
 (0)