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:
@@ -1059,6 +1059,14 @@ typedef struct
|
||||
#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
/**
|
||||
* Flags for runnable objects.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
ECMA_RUNNABLE_FLAGS_EMPTY = (0), /**< empty flags */
|
||||
ECMA_RUNNABLE_FLAGS_MODULE = (1 << 0) /**< runnable is a module */
|
||||
} ecma_runnable_flags_t;
|
||||
|
||||
/**
|
||||
* Description of arrow function objects.
|
||||
|
||||
Reference in New Issue
Block a user