Rework export default parsing (#4505)

- Remove SCANNER_LITERAL_POOL_DEFAULT_CLASS_NAME workaround
- Add async and generator function support
- Fix auto semicolon insertion after export statement
- fixes #4150.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2021-01-19 16:30:41 +01:00
committed by GitHub
parent 3e548401fd
commit bf7fa39581
17 changed files with 387 additions and 112 deletions
+3 -3
View File
@@ -17,8 +17,8 @@ export {};
export {a as aa,};
export {b as bb, c as cc};
export {d};
export var x = 42;
export function f(a) {return a;};
export var x = 40;
export function f(a) {return a;} x++; /* test auto semicolon insertion */
export class Dog {
constructor (name) {
this.name = name;
@@ -27,7 +27,7 @@ export class Dog {
speak() {
return this.name + " barks."
}
};
} x++; /* test auto semicolon insertion */
export default "default";
var a = "a";