Add validation for single statement lexical declarations (#3326)

This patch fixes #3275 and fixes #3276.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2019-11-19 15:44:12 +01:00
committed by GitHub
parent 134f0c0d0f
commit a1189cfb62
7 changed files with 92 additions and 1 deletions
+1
View File
@@ -115,6 +115,7 @@ typedef enum
PARSER_ERR_OBJECT_PROPERTY_REDEFINED, /**< property of object literal redefined */
#if ENABLED (JERRY_ES2015)
PARSER_ERR_VARIABLE_REDECLARED, /**< a variable redeclared */
PARSER_ERR_LEXICAL_SINGLE_STATEMENT, /**< lexical variable in single statement context */
PARSER_ERR_MISSING_ASSIGN_AFTER_CONST, /**< an assignment is required after a const declaration */
PARSER_ERR_MULTIPLE_CLASS_CONSTRUCTORS, /**< multiple class constructor */