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:
@@ -212,8 +212,10 @@ Option bits for [jerry_parse](#jerry_parse) and
|
||||
|
||||
- JERRY_PARSE_NO_OPTS - no options passed
|
||||
- JERRY_PARSE_STRICT_MODE - enable strict mode
|
||||
- JERRY_PARSE_MODULE - parse source as an ECMAScript module
|
||||
|
||||
*New in version 2.0*.
|
||||
*Changed in version 2.4: Added `JERRY_PARSE_MODULE`.*
|
||||
|
||||
## jerry_gc_mode_t
|
||||
|
||||
|
||||
Reference in New Issue
Block a user