1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:47:44 +00:00

LibJS: Parse assert clauses of in- and export statements

Based on proposal: https://tc39.es/proposal-import-assertions
Since imports are not supported yet this is not functional.
This commit is contained in:
davidot 2021-12-20 15:29:25 +01:00 committed by Linus Groh
parent 81312986fe
commit be3b806487
4 changed files with 124 additions and 17 deletions

View file

@ -185,6 +185,7 @@ private:
bool match_secondary_expression(const Vector<TokenType>& forbidden = {}) const;
bool match_statement() const;
bool match_export_or_import() const;
bool match_assert_clause() const;
bool match_declaration() const;
bool try_match_let_declaration() const;
bool match_variable_declaration() const;
@ -220,6 +221,7 @@ private:
bool parse_directive(ScopeNode& body);
void parse_statement_list(ScopeNode& output_node, AllowLabelledFunction allow_labelled_functions = AllowLabelledFunction::No);
void parse_assert_clause(ModuleRequest& request);
struct RulePosition {
AK_MAKE_NONCOPYABLE(RulePosition);