Rework module parsing and execution (#4462)
This patch disables automatic detection of module code, and instead requires the user to explicitly specify whether to parse a source as a module or as a script. To achieve this the jerry_parse API function now takes a new option which signals that the source should be parsed as a module. JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai daniel.batyai@h-lab.eu
This commit is contained in:
@@ -1396,7 +1396,7 @@ parser_error_to_string (parser_error_t error) /**< error code */
|
||||
}
|
||||
case PARSER_ERR_MODULE_UNEXPECTED:
|
||||
{
|
||||
return "Import and export statements must be in the global context.";
|
||||
return "Unexpected import or export statement.";
|
||||
}
|
||||
case PARSER_ERR_LEFT_BRACE_MULTIPLY_EXPECTED:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user