Fix function argument handling issues caused by the parser. (#3705)
1) Nested function declarations should not overwrite arguments. 2) Functions should be created in the correct scope. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
@@ -148,12 +148,14 @@ typedef enum
|
||||
SCANNER_STREAM_TYPE_LET, /**< let declaration */
|
||||
SCANNER_STREAM_TYPE_CONST, /**< const declaration */
|
||||
SCANNER_STREAM_TYPE_LOCAL, /**< local declaration (e.g. catch block) */
|
||||
SCANNER_STREAM_TYPE_DESTRUCTURED_ARG, /**< destructuring argument 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 */
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
SCANNER_STREAM_TYPE_DESTRUCTURED_ARG, /**< destructuring argument declaration */
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
/* 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 */
|
||||
|
||||
Reference in New Issue
Block a user