1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:27:45 +00:00

LibJS: Split parsing program to script and module separately

This allows us to only perform checks like export bindings existing only
for modules. Also this makes it easier to set strict and other state
variables with TemporaryChanges.
This commit is contained in:
davidot 2021-11-27 00:01:23 +01:00 committed by Linus Groh
parent 22174d3b7b
commit b7c7d54167
3 changed files with 74 additions and 10 deletions

View file

@ -176,6 +176,9 @@ public:
private:
friend class ScopePusher;
void parse_script(Program& program, bool starts_in_strict_mode);
void parse_module(Program& program);
Associativity operator_associativity(TokenType) const;
bool match_expression() const;
bool match_unary_prefixed_expression() const;