Correctly handle variables imported or exported by modules. (#3270)

Remove var declaration workarounds and correctly create / use variables for modules.

Still missing: create lexical environment for automatic module conversion.
(Or remove this feature overall.)

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2019-11-04 16:51:26 +01:00
committed by Dániel Bátyai
parent 6f83da4c0b
commit ab8fa74b86
15 changed files with 279 additions and 69 deletions
+3 -2
View File
@@ -78,8 +78,9 @@ typedef enum
PARSER_IS_EVAL = (1u << 25), /**< eval code */
#endif /* ENABLED (JERRY_ES2015) */
#if ENABLED (JERRY_ES2015_MODULE_SYSTEM)
PARSER_MODULE_DEFAULT_CLASS_OR_FUNC = (1u << 26), /**< parsing a function or class default export */
PARSER_MODULE_STORE_IDENT = (1u << 27), /**< store identifier of the current export statement */
PARSER_IS_MODULE = (1u << 26), /**< an export / import keyword is encountered */
PARSER_MODULE_DEFAULT_CLASS_OR_FUNC = (1u << 27), /**< parsing a function or class default export */
PARSER_MODULE_STORE_IDENT = (1u << 28), /**< store identifier of the current export statement */
#endif /* ENABLED (JERRY_ES2015_MODULE_SYSTEM) */
#ifndef JERRY_NDEBUG
PARSER_SCANNING_SUCCESSFUL = (1u << 30), /**< scanning process was successful */