Support function statements after 'if' or 'else'. (#3699)

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2020-04-29 13:50:01 +02:00
committed by GitHub
parent 2bdd0f5008
commit 85401db547
7 changed files with 233 additions and 20 deletions
+4
View File
@@ -1127,6 +1127,10 @@ parser_error_to_string (parser_error_t error) /**< error code */
{
return "Lexical declaration cannot appear in a single-statement context.";
}
case PARSER_ERR_LABELLED_FUNC_NOT_IN_BLOCK:
{
return "Labelled functions are only allowed inside blocks.";
}
case PARSER_ERR_LEXICAL_LET_BINDING:
{
return "Let binding cannot appear in let/const declarations.";