Implement namespace exports in modules (#4708)

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2021-07-09 07:23:28 +02:00
committed by GitHub
parent e3a299b3d6
commit 7f6a699700
6 changed files with 130 additions and 5 deletions
+14
View File
@@ -1851,6 +1851,20 @@ scanner_scan_statement (parser_context_t *context_p, /**< context */
if (context_p->token.type == LEXER_MULTIPLY)
{
lexer_next_token (context_p);
if (lexer_token_is_identifier (context_p, "as", 2))
{
lexer_next_token (context_p);
if (context_p->token.type != LEXER_LITERAL
&& context_p->token.lit_location.type == LEXER_IDENT_LITERAL)
{
scanner_raise_error (context_p);
}
lexer_next_token (context_p);
}
if (!lexer_token_is_identifier (context_p, "from", 4))
{
scanner_raise_error (context_p);