Conversation
|
This test runs with these changes: |
| ReadChar(); | ||
| ERROR("unexpected char"); | ||
| continue; | ||
| return TextToken(TokenType::Reserved); |
There was a problem hiding this comment.
The ; is a reserved character in 3.0
https://webassembly.github.io/spec/core/text/lexical.html#characters
It was not in 2.0, but annotations cannot be checked in lexer.
https://www.w3.org/TR/2025/CRD-wasm-core-2-20250616/#tokens%E2%91%A0
This change should not cause any issues, just yield a different error.
| } else if (c == ',' || c == ';' || c == '[' || c == ']' || c == '{' || | ||
| c == '}') { | ||
| ReadChar(); | ||
| return TextToken(TokenType::Reserved); |
There was a problem hiding this comment.
Same story as above.
| ;;; ERROR: 1 | ||
| (module | ||
| (@a (@)) | ||
| (@)) |
There was a problem hiding this comment.
Each test contains a valid and an invalid case.
016ab8c to
cd9771e
Compare
| return GetStringToken(TokenType::LparAnn); | ||
| } | ||
|
|
||
| while (IsIdChar(PeekChar())) { |
There was a problem hiding this comment.
GetIdChars() accepts ", while we should not.
|
Unfortunately this patch adds a lot of minor changes to improve annotation support. Errors remain errors, but their description changes. Error sequences as well, so a stray To keep the old operation we could add a I removed the empty file support, since I could not figure out a good way to handle it. The problem is: An option to fix it is adding a @sbc100 what do you think about these changes? |
| switch (ReadChar()) { | ||
| case kEof: | ||
| return BareToken(TokenType::Eof); | ||
| token_start_ = saved_token_start; |
There was a problem hiding this comment.
The old operation could be kept with an if (token_type == TokenType::LparAnn) if needed. I don't know if it is needed.
9133417 to
d12f13d
Compare
d12f13d to
1b3a65b
Compare
|
@sbc100 Some good news: if the annotation support is fixed, and the gc patches are applied, the whole wasm 3.0 spec test suite is passed. |
No description provided.