|
|
|
# Not implemented yet:
|
Module parsing (#2411)
I'm creating this draft PR, since I wanted to have some early feedback, and because I though I would have time to finish it last week, but I got caught up with other stuff. Feel free to contribute :)
The main thing here is that I have divided `eval()`, `parse()` and similar functions so that they can decide if they are parsing scripts or modules. Let me know your thoughts.
Then, I was checking the import & export parsing, and I noticed we are using `TokenKind::Identifier` for `IdentifierName`, so I changed that name. An `Identifier` is an `IdentifierName` that isn't a `ReservedWord`. This means we should probably also adapt all `IdentifierReference`, `BindingIdentifier` and so on parsing. I already created an `Identifier` parser.
Something interesting there is that `await` is not a valid `Identifier` if the goal symbol is `Module`, as you can see in the [spec](https://tc39.es/ecma262/#prod-LabelIdentifier), but currently we don't have that information in the `InputElement` enumeration, we only have `Div`, `RegExp` and `TemplateTail`. How could we approach this?
Co-authored-by: jedel1043 <jedel0124@gmail.com>
2 years ago
|
|
|
flags = []
|
|
|
|
|
|
|
|
features = [
|
|
|
|
# Non-implemented features:
|
|
|
|
"json-modules",
|
|
|
|
"SharedArrayBuffer",
|
|
|
|
"resizable-arraybuffer",
|
|
|
|
"Temporal",
|
|
|
|
"tail-call-optimization",
|
|
|
|
"ShadowRealm",
|
|
|
|
"FinalizationRegistry",
|
|
|
|
"Atomics",
|
|
|
|
"dynamic_import",
|
|
|
|
"decorators",
|
|
|
|
"array-grouping",
|
|
|
|
"IsHTMLDDA",
|
|
|
|
|
|
|
|
# Non-implemented Intl features
|
|
|
|
"intl-normative-optional",
|
|
|
|
"Intl.DurationFormat",
|
|
|
|
"Intl.DisplayNames",
|
|
|
|
"Intl.RelativeTimeFormat",
|
|
|
|
"Intl.Segmenter",
|
|
|
|
|
|
|
|
# Stage 3 proposals
|
|
|
|
|
|
|
|
# https://github.com/tc39/proposal-symbols-as-weakmap-keys
|
|
|
|
"symbols-as-weakmap-keys",
|
|
|
|
# https://github.com/tc39/proposal-intl-locale-info
|
|
|
|
"Intl.Locale-info",
|
|
|
|
# https://github.com/tc39/proposal-intl-enumeration
|
|
|
|
"Intl-enumeration",
|
|
|
|
# https://github.com/tc39/proposal-array-from-async
|
|
|
|
"Array.fromAsync",
|
|
|
|
|
|
|
|
# Non-standard
|
|
|
|
"caller",
|
|
|
|
|
|
|
|
# RegExp tests that check individual codepoints.
|
|
|
|
# They are not useful considering the cpu time they waste.
|
|
|
|
"regexp-unicode-property-escapes",
|
|
|
|
]
|
|
|
|
|
|
|
|
# RegExp tests that check individual codepoints.
|
|
|
|
# They are not useful considering the cpu time they waste.
|
|
|
|
tests = ["CharacterClassEscapes", "NumberFormat"]
|