Update parser early return type in ESNEXT (#3742)

This patch updates the early return types in the parser to SyntaxError instead of ReferenceError
in ESNEXT

This patch also includes a lot of tests for LeftHandSideExpression validation when using the = operator

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
This commit is contained in:
Szilagyi Adam
2020-07-06 13:36:28 +02:00
committed by GitHub
parent 97fc48132a
commit 69f917650e
40 changed files with 3362 additions and 37 deletions
@@ -13,15 +13,15 @@
// limitations under the License.
try {
[this,000000000,this,99999999=9999999];
eval('[this,000000000,this,99999999=9999999]');
assert(false);
} catch (e) {
assert(e instanceof ReferenceError);
assert(e instanceof SyntaxError);
}
try {
[this,999+=8];
eval('[this,999+=8]');
assert(false);
} catch (e) {
assert(e instanceof ReferenceError);
assert(e instanceof SyntaxError);
}