Implement nullish coalescing operator (#3997)

JerryScript-DCO-1.0-Signed-off-by: bence gabor kis kisbg@inf.u-szeged.hu
This commit is contained in:
kisbg
2020-07-17 15:42:51 +02:00
committed by GitHub
parent f60e16d9d5
commit dfd9d4497a
13 changed files with 323 additions and 72 deletions
+4
View File
@@ -1206,6 +1206,10 @@ parser_error_to_string (parser_error_t error) /**< error code */
{
return "Left operand of ** operator cannot be unary expression.";
}
case PARSER_ERR_INVALID_NULLISH_COALESCING:
{
return "Cannot chain nullish with logical AND or OR.";
}
case PARSER_ERR_FORMAL_PARAM_AFTER_REST_PARAMETER:
{
return "Rest parameter must be the last formal parameter.";