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
View File
@@ -145,6 +145,9 @@ typedef enum
SCANNER_STREAM_TYPE_LET, /**< let declaration */
SCANNER_STREAM_TYPE_CONST, /**< const declaration */
#endif /* ENABLED (JERRY_ES2015) */
#if ENABLED (JERRY_ES2015_MODULE_SYSTEM)
SCANNER_STREAM_TYPE_IMPORT, /**< module import */
#endif /* ENABLED (JERRY_ES2015_MODULE_SYSTEM) */
SCANNER_STREAM_TYPE_ARG, /**< argument declaration */
/* Function types should be at the end. See the SCANNER_STREAM_TYPE_IS_FUNCTION macro. */
SCANNER_STREAM_TYPE_ARG_FUNC, /**< argument declaration which is later initialized with a function */