mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-04 23:30:20 +00:00
LibJS: Do not consume "with" tokens in import statements as identifiers
The "with" statement is its own token (TokenType::With), and thus would fail to parse as an identifier. We've already asserted that the token we are parsing is "with" or "assert", so just consume it.
This commit is contained in:
parent
2c3077d929
commit
47ba231a9b
Notes:
github-actions[bot]
2025-01-21 13:59:36 +00:00
Author: https://github.com/trflynn89
Commit: 47ba231a9b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3324
3 changed files with 37 additions and 2 deletions
2
Libraries/LibJS/Tests/modules/json-module.mjs
Normal file
2
Libraries/LibJS/Tests/modules/json-module.mjs
Normal file
|
@ -0,0 +1,2 @@
|
|||
import json from "./json-module.json" with { type: "json" };
|
||||
export default json;
|
Loading…
Add table
Add a link
Reference in a new issue