Support dynamic import calls (#4652)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
@@ -2424,6 +2424,18 @@ parser_parse_import_statement (parser_context_t *context_p) /**< parser context
|
||||
JERRY_ASSERT (context_p->token.type == LEXER_KEYW_IMPORT);
|
||||
JERRY_ASSERT (context_p->module_names_p == NULL);
|
||||
|
||||
if (lexer_check_next_character (context_p, LIT_CHAR_LEFT_PAREN))
|
||||
{
|
||||
if (context_p->status_flags & PARSER_IS_FUNCTION)
|
||||
{
|
||||
parser_parse_expression_statement (context_p, PARSE_EXPR);
|
||||
return;
|
||||
}
|
||||
|
||||
parser_parse_block_expression (context_p, PARSE_EXPR);
|
||||
return;
|
||||
}
|
||||
|
||||
parser_module_check_request_place (context_p);
|
||||
lexer_next_token (context_p);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user