Skip to content

Commit 13a795c

Browse files
committed
Switch from <core:string> to <core:name>
1 parent b395e37 commit 13a795c

2 files changed

Lines changed: 11 additions & 7 deletions

File tree

design/mvp/Explainer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2553,7 +2553,7 @@ attribute ::= <versionsuffix> 🔗
25532553
| <externalid> 🏷️
25542554
versionsuffix ::= (versionsuffix <semversuffixstr>) 🔗
25552555
implements ::= (implements <interfacenamestr>) 🏷️
2556-
externalid ::= (external-id <string>) 🏷️
2556+
externalid ::= (external-id <name>) 🏷️
25572557
```
25582558
Imports and exports both have a *name* (`externnamestr`) and a list of
25592559
*attributes* (`attribute*`). Imports always include a type (`externtype`).

design/mvp/WIT.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ token ::= whitespace
10111011
| keyword
10121012
| integer
10131013
| identifier
1014-
| string
1014+
| string-literal
10151015
```
10161016

10171017
Whitespace and comments are ignored when parsing structures defined elsewhere
@@ -1108,13 +1108,17 @@ sequence of digits:
11081108
integer ::= [0-9]+
11091109
```
11101110

1111-
### Strings
1111+
### Strings Literals
11121112

11131113
WIT string literals are double-quoted and use the same text format as the Core
1114-
WebAssembly text format's [`string`] literal. For example `"a"`, `"☃︎"`, `"\7f"`
1115-
and `"\u{7fff}"` are all `string` literals.
1114+
WebAssembly text format's [`name`] literal. For example `"a"`, `"☃︎"`, `"\7f"`
1115+
and `"\u{7fff}"` are all `name` literals.
11161116

1117-
[`string`]: https://webassembly.github.io/spec/core/text/values.html#text-string
1117+
```ebnf
1118+
string-literal ::= <core:name>
1119+
```
1120+
1121+
[`name`]: https://webassembly.github.io/spec/core/text/values.html#text-name
11181122

11191123
## Top-level items
11201124

@@ -1442,7 +1446,7 @@ export-item ::= external-id? 'export' id ':' extern-type
14421446
import-item ::= external-id? 'import' id ':' extern-type
14431447
| 'import' use-path ';'
14441448
1445-
external-id ::= '@external-id' '(' string ')' 🏷️
1449+
external-id ::= '@external-id' '(' string-literal ')' 🏷️
14461450
14471451
extern-type ::= func-type ';'
14481452
| 'interface' '{' interface-items* '}'

0 commit comments

Comments
 (0)