Repository navigation
[test] Add string escape cases - #2352
Merged
Merged
Conversation
No test uses the \r and \' string escapes. Export a function under each name and invoke it by an independent spelling of the same name.
The hex digits of a \u{...} escape follow the hexnum rule, so one
underscore between two digits is valid. Export a name with \u{1_F600}
and invoke it by its UTF-8 bytes. A leading, trailing, or double
underscore is an illegal escape.
ibmibmibm
marked this pull request as ready for review
November 25, 2026 23:25
ibmibmibm
added a commit
to WasmEdge/wabt
that referenced
this pull request
Nov 26, 2026
The text format defines the digits of a `\u{...}` escape as a hexnum,
which lets a single `_` separate two hex digits, for example
`\u{1_F600}`. WebAssembly/spec#2352 adds this case to names.wast, and
wabt rejects it with `bad escape "\u{1"`. The lexer and the string
decoder now accept it. A leading, trailing or double `_` is still a bad
escape.
rossberg
approved these changes
Nov 26, 2026
ibmibmibm
added a commit
to WasmEdge/wabt
that referenced
this pull request
Nov 26, 2026
The text format defines the digits of a `\u{...}` escape as a hexnum,
which lets a single `_` separate two hex digits, for example
`\u{1_F600}`. WebAssembly/spec#2352 adds this case to names.wast, and
wabt rejects it with `bad escape "\u{1"`. The lexer and the string
decoder now accept it. A leading, trailing or double `_` is still a bad
escape.
ibmibmibm
added a commit
to WasmEdge/wabt
that referenced
this pull request
Nov 26, 2026
The text format defines the digits of a `\u{...}` escape as a hexnum,
which lets a single `_` separate two hex digits, for example
`\u{1_F600}`. WebAssembly/spec#2352 adds this case to names.wast, and
wabt rejects it with `bad escape "\u{1"`. The lexer and the string
decoder now accept it. A leading, trailing or double `_` is still a bad
escape.
ibmibmibm
added a commit
to WasmEdge/wabt
that referenced
this pull request
Nov 27, 2026
The text format defines the digits of a `\u{...}` escape as a hexnum,
which lets a single `_` separate two hex digits, for example
`\u{1_F600}`. WebAssembly/spec#2352 adds this case to names.wast, and
wabt rejects it with `bad escape "\u{1"`. The lexer and the string
decoder now accept it. A leading, trailing or double `_` is still a bad
escape.
ibmibmibm
added a commit
to WasmEdge/wabt
that referenced
this pull request
Nov 27, 2026
The text format defines the digits of a `\u{...}` escape as a hexnum,
which lets a single `_` separate two hex digits, for example
`\u{1_F600}`. WebAssembly/spec#2352 adds this case to names.wast, and
wabt rejects it with `bad escape "\u{1"`. The lexer and the string
decoder now accept it. A leading, trailing or double `_` is still a bad
escape.
ibmibmibm
added a commit
to WasmEdge/wabt
that referenced
this pull request
Nov 27, 2026
The text format defines the digits of a `\u{...}` escape as a hexnum,
which lets a single `_` separate two hex digits, for example
`\u{1_F600}`. WebAssembly/spec#2352 adds this case to names.wast, and
wabt rejects it with `bad escape "\u{1"`. The lexer and the string
decoder now accept it. A leading, trailing or double `_` is still a bad
escape.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the first tests for the
\rand\'escapes, and for_in\u{...}. Each name is invoked by another spelling, so the decoded value is checked. A leading, trailing or double_is an illegal escape.wast2json 1.0.42 rejects the valid
\u{1_F600}, so it can no longer convertnames.wast.