Scanner rework. (#3038)

The scanner was an on-demand tool of the parser, which was triggered by certain
statements. After the rework, the scanner runs only once, and collects all information.
This information is passed to the parser.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2019-09-11 11:15:46 +02:00
committed by Dániel Bátyai
parent 6221b670d1
commit fbde788d1f
24 changed files with 2511 additions and 1471 deletions
+8
View File
@@ -125,6 +125,13 @@ default:
func = () =>
((([0,0,0])))
assert (func ().length == 3);
func = (a = 5, b = 7 * 2) => a + b;
assert (func() == 19);
assert (func(1) == 15);
func = (a = Math.cos(0)) => a;
assert (func() == 1);
}
must_throw ("var x => x;");
@@ -136,6 +143,7 @@ must_throw ("(x,y,) => 0");
must_throw ("x\n => 0");
must_throw ("this => 0");
must_throw ("(true) => 0");
must_throw ("()\n=>5");
must_throw_strict ("(package) => 0");
must_throw_strict ("(package) => { return 5 }");
must_throw_strict ("(x,x,x) => 0");