Web Inspector: Update Esprima to support modern JavaScript language features
authorpecoraro@apple.com <pecoraro@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Aug 2019 03:03:32 +0000 (03:03 +0000)
committerpecoraro@apple.com <pecoraro@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Aug 2019 03:03:32 +0000 (03:03 +0000)
https://bugs.webkit.org/show_bug.cgi?id=200796

Reviewed by Ross Kirsling.

Source/WebInspectorUI:

Use a fork of Esprima to support modern JavaScript language features
while going through the process to upstream support:

  ES2018 Feature: Async Iteration (for-await-of)
  https://github.com/jquery/esprima/issues/1990

  ES2019 Feature: Numeric Separator
  https://github.com/jquery/esprima/issues/1989

  ES2019 Feature: Optional catch binding
  https://github.com/jquery/esprima/issues/1953

  ES2020 Feature: BigInt
  https://github.com/jquery/esprima/issues/1988

ESTree compatible AST changes are summarized as:

  - CatchClause `param` property is now nullable
  - ForOfStatement now has a boolean `await` property
  - Literal can be a `"bigint"` type (works if the environment has BigInt or not)

The pretty printer only needed to have additional handling for `for-await-of`.

* UserInterface/External/Esprima/esprima.js:
New version. Typescript output expects a modern JavaScript environment
instead of just ES6.

* Tools/Formatting/index.html:
Update the formatting tool for easier use in case of errors.

* UserInterface/Models/ScriptSyntaxTree.js:
(WI.ScriptSyntaxTree.prototype._createInternalSyntaxTree):

* UserInterface/Test/TestHarness.js:
(TestHarness.prototype.passOrFail):
Convenience for pass/fail with the same message based on a condition.

* UserInterface/Workers/Formatter/EsprimaFormatter.js:
(EsprimaFormatter.prototype._handleTokenAtNode):
Ensure a space after `await` in `for await` syntax.

LayoutTests:

* inspector/formatting/resources/javascript-tests/classes-expected.js:
* inspector/formatting/resources/javascript-tests/classes.js:
* inspector/formatting/resources/javascript-tests/for-statements-expected.js:
* inspector/formatting/resources/javascript-tests/for-statements.js:
* inspector/formatting/resources/javascript-tests/generators-expected.js:
* inspector/formatting/resources/javascript-tests/generators.js:
* inspector/formatting/resources/javascript-tests/numbers-expected.js: Added.
* inspector/formatting/resources/javascript-tests/numbers.js: Added.
* inspector/formatting/resources/javascript-tests/try-catch-finally-statements-expected.js:
* inspector/formatting/resources/javascript-tests/try-catch-finally-statements.js:
* inspector/formatting/resources/javascript-tests/unary-binary-expressions-expected.js:
* inspector/formatting/resources/javascript-tests/unary-binary-expressions.js:
Test formatting of new JavaScript language features.

* inspector/formatting/formatting-css-expected.txt:
* inspector/formatting/formatting-javascript-expected.txt:
* inspector/formatting/formatting-javascript.html:
* inspector/formatting/resources/utilities.js:
(TestPage.registerInitializer.async.runFormattingTest):
(TestPage.registerInitializer.window.addFormattingTests):
(TestPage.registerInitializer):
Cleaner output and better handling for debugging failures.

* inspector/model/parse-script-syntax-tree.html:
Test new AST permutations.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248760 268f45cc-cd09-0410-ab3c-d52691b4dbfc

24 files changed:
LayoutTests/ChangeLog
LayoutTests/inspector/formatting/formatting-css-expected.txt
LayoutTests/inspector/formatting/formatting-javascript-expected.txt
LayoutTests/inspector/formatting/formatting-javascript.html
LayoutTests/inspector/formatting/resources/javascript-tests/classes-expected.js
LayoutTests/inspector/formatting/resources/javascript-tests/classes.js
LayoutTests/inspector/formatting/resources/javascript-tests/for-statements-expected.js
LayoutTests/inspector/formatting/resources/javascript-tests/for-statements.js
LayoutTests/inspector/formatting/resources/javascript-tests/generators-expected.js
LayoutTests/inspector/formatting/resources/javascript-tests/generators.js
LayoutTests/inspector/formatting/resources/javascript-tests/numbers-expected.js [new file with mode: 0644]
LayoutTests/inspector/formatting/resources/javascript-tests/numbers.js [new file with mode: 0644]
LayoutTests/inspector/formatting/resources/javascript-tests/try-catch-finally-statements-expected.js
LayoutTests/inspector/formatting/resources/javascript-tests/try-catch-finally-statements.js
LayoutTests/inspector/formatting/resources/javascript-tests/unary-binary-expressions-expected.js
LayoutTests/inspector/formatting/resources/javascript-tests/unary-binary-expressions.js
LayoutTests/inspector/formatting/resources/utilities.js
LayoutTests/inspector/model/parse-script-syntax-tree.html
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/Tools/Formatting/index.html
Source/WebInspectorUI/UserInterface/External/Esprima/esprima.js
Source/WebInspectorUI/UserInterface/Models/ScriptSyntaxTree.js
Source/WebInspectorUI/UserInterface/Test/TestHarness.js
Source/WebInspectorUI/UserInterface/Workers/Formatter/EsprimaFormatter.js

index 9493cf2..312720d 100644 (file)
@@ -1,3 +1,36 @@
+2019-08-15  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: Update Esprima to support modern JavaScript language features
+        https://bugs.webkit.org/show_bug.cgi?id=200796
+
+        Reviewed by Ross Kirsling.
+
+        * inspector/formatting/resources/javascript-tests/classes-expected.js:
+        * inspector/formatting/resources/javascript-tests/classes.js:
+        * inspector/formatting/resources/javascript-tests/for-statements-expected.js:
+        * inspector/formatting/resources/javascript-tests/for-statements.js:
+        * inspector/formatting/resources/javascript-tests/generators-expected.js:
+        * inspector/formatting/resources/javascript-tests/generators.js:
+        * inspector/formatting/resources/javascript-tests/numbers-expected.js: Added.
+        * inspector/formatting/resources/javascript-tests/numbers.js: Added.
+        * inspector/formatting/resources/javascript-tests/try-catch-finally-statements-expected.js:
+        * inspector/formatting/resources/javascript-tests/try-catch-finally-statements.js:
+        * inspector/formatting/resources/javascript-tests/unary-binary-expressions-expected.js:
+        * inspector/formatting/resources/javascript-tests/unary-binary-expressions.js:
+        Test formatting of new JavaScript language features.
+
+        * inspector/formatting/formatting-css-expected.txt:
+        * inspector/formatting/formatting-javascript-expected.txt:
+        * inspector/formatting/formatting-javascript.html:
+        * inspector/formatting/resources/utilities.js:
+        (TestPage.registerInitializer.async.runFormattingTest):
+        (TestPage.registerInitializer.window.addFormattingTests):
+        (TestPage.registerInitializer):
+        Cleaner output and better handling for debugging failures.
+
+        * inspector/model/parse-script-syntax-tree.html:
+        Test new AST permutations.
+
 2019-08-15  Zalan Bujtas  <zalan@apple.com>
 
         [ContentChangeObserver] Keep track of all the visibility candidates.
index 38eb04f..a941f5e 100644 (file)
@@ -2,24 +2,12 @@ Test CSS formatting.
 
 
 == Running test suite: CSSFormatter
--- Running test case: CSSFormatter.basic.css
-PASS
-
--- Running test case: CSSFormatter.comment.css
-PASS
-
--- Running test case: CSSFormatter.gradient.css
-PASS
-
--- Running test case: CSSFormatter.keyframes.css
-PASS
-
--- Running test case: CSSFormatter.media-query.css
-PASS
-
--- Running test case: CSSFormatter.selectors.css
-PASS
-
--- Running test case: CSSFormatter.wrapping.css
-PASS
+-- Running test case: CSSFormatter
+PASS: basic.css
+PASS: comment.css
+PASS: gradient.css
+PASS: keyframes.css
+PASS: media-query.css
+PASS: selectors.css
+PASS: wrapping.css
 
index 2ba5d73..c4cbb6d 100644 (file)
@@ -2,87 +2,34 @@ Test JavaScript formatting.
 
 
 == Running test suite: EsprimaFormatter.JavaScript
--- Running test case: EsprimaFormatter.JavaScript.arrow-functions.js
-PASS
-
--- Running test case: EsprimaFormatter.JavaScript.classes.js
-PASS
-
--- Running test case: EsprimaFormatter.JavaScript.comments-and-preserve-newlines.js
-PASS
-
--- Running test case: EsprimaFormatter.JavaScript.comments-only.js
-PASS
-
--- Running test case: EsprimaFormatter.JavaScript.do-while-statement.js
-PASS
-
--- Running test case: EsprimaFormatter.JavaScript.for-statements.js
-PASS
-
--- Running test case: EsprimaFormatter.JavaScript.functions.js
-PASS
-
--- Running test case: EsprimaFormatter.JavaScript.generators.js
-PASS
-
--- Running test case: EsprimaFormatter.JavaScript.if-statement.js
-PASS
-
--- Running test case: EsprimaFormatter.JavaScript.import.js
-PASS
-
--- Running test case: EsprimaFormatter.JavaScript.label-break-continue-block.js
-PASS
-
--- Running test case: EsprimaFormatter.JavaScript.logic-expressions.js
-PASS
-
--- Running test case: EsprimaFormatter.JavaScript.new-expression.js
-PASS
-
--- Running test case: EsprimaFormatter.JavaScript.object-array-literal.js
-PASS
-
--- Running test case: EsprimaFormatter.JavaScript.other-statements.js
-PASS
-
--- Running test case: EsprimaFormatter.JavaScript.return-statement.js
-PASS
-
--- Running test case: EsprimaFormatter.JavaScript.sample-jquery.js
-PASS
-
--- Running test case: EsprimaFormatter.JavaScript.sample-normal-utilities.js
-PASS
-
--- Running test case: EsprimaFormatter.JavaScript.sample-webinspector-object.js
-PASS
-
--- Running test case: EsprimaFormatter.JavaScript.switch-case-default.js
-PASS
-
--- Running test case: EsprimaFormatter.JavaScript.template-strings.js
-PASS
-
--- Running test case: EsprimaFormatter.JavaScript.ternary-expressions.js
-PASS
-
--- Running test case: EsprimaFormatter.JavaScript.try-catch-finally-statements.js
-PASS
-
--- Running test case: EsprimaFormatter.JavaScript.unary-binary-expressions.js
-PASS
-
--- Running test case: EsprimaFormatter.JavaScript.variable-declaration.js
-PASS
-
--- Running test case: EsprimaFormatter.JavaScript.while-statement.js
-PASS
-
--- Running test case: EsprimaFormatter.JavaScript.with-statement.js
-PASS
-
--- Running test case: EsprimaFormatter.JavaScript.modules.js
-PASS
+-- Running test case: EsprimaFormatter.JavaScript
+PASS: arrow-functions.js
+PASS: classes.js
+PASS: comments-and-preserve-newlines.js
+PASS: comments-only.js
+PASS: do-while-statement.js
+PASS: for-statements.js
+PASS: functions.js
+PASS: generators.js
+PASS: if-statement.js
+PASS: import.js
+PASS: label-break-continue-block.js
+PASS: logic-expressions.js
+PASS: new-expression.js
+PASS: numbers.js
+PASS: object-array-literal.js
+PASS: other-statements.js
+PASS: return-statement.js
+PASS: sample-jquery.js
+PASS: sample-normal-utilities.js
+PASS: sample-webinspector-object.js
+PASS: switch-case-default.js
+PASS: template-strings.js
+PASS: ternary-expressions.js
+PASS: try-catch-finally-statements.js
+PASS: unary-binary-expressions.js
+PASS: variable-declaration.js
+PASS: while-statement.js
+PASS: with-statement.js
+PASS: modules.js
 
index 9db6617..c654c7a 100644 (file)
@@ -22,6 +22,7 @@ function test()
         "resources/javascript-tests/label-break-continue-block.js",
         "resources/javascript-tests/logic-expressions.js",
         "resources/javascript-tests/new-expression.js",
+        "resources/javascript-tests/numbers.js",
         "resources/javascript-tests/object-array-literal.js",
         "resources/javascript-tests/other-statements.js",
         "resources/javascript-tests/return-statement.js",
index dc506e0..b3277be 100644 (file)
@@ -144,3 +144,56 @@ class Foo {
     async 1() {}
     async ["f"]() {}
 }
+
+// ES2018 - Async Iteration / Async Generators
+
+class Foo {
+    static async *async()
+    {
+        1
+    }
+    async *async()
+    {
+        1
+    }
+    *async()
+    {
+        1
+    }
+}
+
+class Foo {
+    static async *async()
+    {
+        1
+    }
+    async *async()
+    {
+        1
+    }
+    *async()
+    {
+        1
+    }
+}
+
+class Foo {
+    static async *async()
+    {
+        1
+    }
+    async *async()
+    {
+        1
+    }
+    *async()
+    {
+        1
+    }
+}
+
+class Foo {
+    async *"f"() {}
+    async *1() {}
+    async *["f"]() {}
+}
index 11233eb..06de3d5 100644 (file)
@@ -20,3 +20,13 @@ A = class Foo extends(b?Bar:Bar){constructor(){new.target.staticMethod()}static
 class Foo{static async async(){1}async async(){1}async(){1}}
 
 class Foo{async"f"(){}async 1(){}async["f"](){}}
+
+// ES2018 - Async Iteration / Async Generators
+
+class Foo{static async*async(){1}async*async(){1}*async(){1}}
+
+class Foo{static async *async(){1}async *async(){1}*async(){1}}
+
+class Foo{static async * async(){1}async * async(){1}* async(){1}}
+
+class Foo{async*"f"(){}async*1(){}async*["f"](){}}
index 9ff94bf..ffe4bd0 100644 (file)
@@ -137,3 +137,22 @@ for (var {foo} of window)
     ;
 for (var [x, y] of [1, 2, 3])
     ;
+
+// ES2018 - Async Iteration / Async Generators
+
+async function f() {
+    for await (x of [])
+        ;
+    for await (x of [1, 2, 3])
+        ;
+    for await (x of ([1, 2, 3]))
+        ;
+    for await (var x of window)
+        ;
+    for await (var x of (window))
+        ;
+    for await (let {foo} of window)
+        ;
+    for await (let [x, y] of [1, 2, 3])
+        ;
+}
index 424f65f..1b42d3d 100644 (file)
@@ -69,3 +69,15 @@ for(var x of window);
 for(var x of (window));
 for(var{foo}of window);
 for(var[x,y]of[1,2,3]);
+
+// ES2018 - Async Iteration / Async Generators
+
+async function f() {
+    for await (x of[]);
+    for await(x of[1,2,3]);
+    for await(x of([1,2,3]));
+    for await(var x of window);
+    for await(var x of (window));
+    for await(let{foo}of window);
+    for await(let[x,y]of[1,2,3]);
+}
index 489ee8d..c37b7fd 100644 (file)
@@ -30,3 +30,38 @@ function* gen() {
 function* gen(a=1, [b, c], ...rest) {
     return yield yield foo("foo")
 }
+
+// ES2018 - Async Iteration / Async Generators
+
+async function* gen() {}
+async function* gen() {
+    1
+}
+async function* gen() {}
+async function* gen() {
+    1
+}
+async function* gen() {}
+async function* gen() {
+    1
+}
+
+async function* gen() {
+    yield
+}
+async function* gen() {
+    yield x
+}
+async function* gen() {
+    yield "x"
+}
+async function* gen() {
+    yield [x]
+}
+async function* gen() {
+    yield foo()
+}
+
+async function* gen(a=1, [b, c], ...rest) {
+    return yield yield foo("foo")
+}
index 7de6689..a6c016c 100644 (file)
@@ -12,3 +12,20 @@ function*gen(){yield[x]}
 function*gen(){yield foo()}
 
 function *gen(a=1,[b,c],...rest){return yield yield foo("foo")}
+
+// ES2018 - Async Iteration / Async Generators
+
+async function*gen(){}
+async function*gen(){1}
+async function* gen(){}
+async function* gen(){1}
+async function *gen(){}
+async function *gen(){1}
+
+async function*gen(){yield}
+async function*gen(){yield x}
+async function*gen(){yield"x"}
+async function*gen(){yield[x]}
+async function*gen(){yield foo()}
+
+async function *gen(a=1,[b,c],...rest){return yield yield foo("foo")}
diff --git a/LayoutTests/inspector/formatting/resources/javascript-tests/numbers-expected.js b/LayoutTests/inspector/formatting/resources/javascript-tests/numbers-expected.js
new file mode 100644 (file)
index 0000000..332066c
--- /dev/null
@@ -0,0 +1,60 @@
+// Basics
+0;
+1;
+123;
+NaN;
+Infinity;
+
+// Floats
+1.2;
+1e2;
+1.e3;
+1.2e3;
+1.2e+3;
+1.2e-3;
+
+// Decimal Prefix
+.2;
+.2e3;
+.2e+3;
+.2e-3;
+
+// Zero Prefixed / Legacy Octal
+00;
+010;
+009;
+
+// Hex, Octal, Binary
+0x101;
+0X201;
+0o101;
+0O201;
+0b101;
+0B101;
+
+// ES2019 - Numeric Separators
+1_2_3_4;
+1_000_000;
+10000_00;
+1_000000_0_0_0;
+1_2.3_4e5_6;
+1_1.2_2;
+1_1e2_2;
+0x1_0;
+0X2_0;
+0o1_0;
+0O2_0;
+0b1_0;
+0B1_0;
+
+// ES2020 - BigInt
+0n;
+123n;
+123456789123456789123456789123456789123456789123456789123456789n;
+1_2_3n;
+0x123n;
+0x223n;
+0o123n;
+0O223n;
+0b101n;
+0B101n;
diff --git a/LayoutTests/inspector/formatting/resources/javascript-tests/numbers.js b/LayoutTests/inspector/formatting/resources/javascript-tests/numbers.js
new file mode 100644 (file)
index 0000000..332066c
--- /dev/null
@@ -0,0 +1,60 @@
+// Basics
+0;
+1;
+123;
+NaN;
+Infinity;
+
+// Floats
+1.2;
+1e2;
+1.e3;
+1.2e3;
+1.2e+3;
+1.2e-3;
+
+// Decimal Prefix
+.2;
+.2e3;
+.2e+3;
+.2e-3;
+
+// Zero Prefixed / Legacy Octal
+00;
+010;
+009;
+
+// Hex, Octal, Binary
+0x101;
+0X201;
+0o101;
+0O201;
+0b101;
+0B101;
+
+// ES2019 - Numeric Separators
+1_2_3_4;
+1_000_000;
+10000_00;
+1_000000_0_0_0;
+1_2.3_4e5_6;
+1_1.2_2;
+1_1e2_2;
+0x1_0;
+0X2_0;
+0o1_0;
+0O2_0;
+0b1_0;
+0B1_0;
+
+// ES2020 - BigInt
+0n;
+123n;
+123456789123456789123456789123456789123456789123456789123456789n;
+1_2_3n;
+0x123n;
+0x223n;
+0o123n;
+0O223n;
+0b101n;
+0B101n;
index d6f7430..c4f98c5 100644 (file)
@@ -1,3 +1,32 @@
+try {} catch {}
+try {} catch {} finally {}
+
+try {
+    1
+} catch {}
+try {
+    1
+} catch {} finally {}
+try {
+    1
+} catch {
+    2
+} finally {}
+try {
+    1
+} catch {
+    2
+} finally {
+    3
+}
+
+try {} catch {
+    2
+} finally {}
+try {} catch {} finally {
+    3
+}
+
 try {} catch (e) {}
 try {} catch (e) {} finally {}
 
index c24d490..03c7bcf 100644 (file)
@@ -1,3 +1,14 @@
+try{}catch{}
+try{}catch{}finally{}
+
+try{1}catch{}
+try{1}catch{}finally{}
+try{1}catch{2}finally{}
+try{1}catch{2}finally{3}
+
+try{}catch{2}finally{}
+try{}catch{}finally{3}
+
 try{}catch(e){}
 try{}catch(e){}finally{}
 
index 519ec4d..14caef8 100644 (file)
@@ -9,47 +9,47 @@ TestPage.registerInitializer(function() {
         });
     }
 
-    function runFormattingTest(mode, testName, testURL) {
-        return loadFormattingTestAndExpectedResults(testURL).then(function(results) {
-            let {testText, expectedText} = results;
-            return new Promise(function(resolve, reject) {
-                let workerProxy = WI.FormatterWorkerProxy.singleton();
-                const indentString = "    ";
+    async function runFormattingTest(mode, testName, testURL) {
+        let {testText, expectedText} = await loadFormattingTestAndExpectedResults(testURL);
+        return new Promise(function(resolve, reject) {
+            let workerProxy = WI.FormatterWorkerProxy.singleton();
+            const indentString = "    ";
 
-                function callback({formattedText, sourceMapData}) {
-                    let pass = formattedText === expectedText;
-                    InspectorTest.log(pass ? "PASS" : "FAIL");
+            function callback({formattedText, sourceMapData}) {
+                let pass = formattedText === expectedText;
+                InspectorTest.passOrFail(pass, testName);
 
-                    if (!pass) {
-                        InspectorTest.log("Input:");
-                        InspectorTest.log("-----------");
-                        InspectorTest.log(testText);
-                        InspectorTest.log("-----------");
-                        InspectorTest.log("Formatted Output: " + formattedText.length);
-                        InspectorTest.log("-----------");
-                        InspectorTest.log(formattedText);
-                        InspectorTest.log("-----------");
-                        InspectorTest.log("Expected Output: " + expectedText.length);
-                        InspectorTest.log("-----------");
-                        InspectorTest.log(expectedText);
-                        InspectorTest.log("-----------");
-                    }
-
-                    resolve(pass);
+                if (formattedText === null)
+                    InspectorTest.log("Failed to parse!");
+                else if (!pass) {
+                    InspectorTest.log("Input:");
+                    InspectorTest.log("-----------");
+                    InspectorTest.log(testText);
+                    InspectorTest.log("-----------");
+                    InspectorTest.log("Formatted Output: " + formattedText.length);
+                    InspectorTest.log("-----------");
+                    InspectorTest.log(formattedText);
+                    InspectorTest.log("-----------");
+                    InspectorTest.log("Expected Output: " + expectedText.length);
+                    InspectorTest.log("-----------");
+                    InspectorTest.log(expectedText);
+                    InspectorTest.log("-----------");
                 }
 
-                switch (mode) {
-                case "text/javascript": {
-                    let isModule = /^module/.test(testName);
-                    workerProxy.formatJavaScript(testText, isModule, indentString, callback);
-                    break;
-                }
+                resolve();
+            }
 
-                case "text/css":
-                    workerProxy.formatCSS(testText, indentString, callback);
-                    break;
-                }
-            });
+            switch (mode) {
+            case "text/javascript": {
+                let isModule = /^module/.test(testName);
+                workerProxy.formatJavaScript(testText, isModule, indentString, callback);
+                break;
+            }
+
+            case "text/css":
+                workerProxy.formatCSS(testText, indentString, callback);
+                break;
+            }
         });
     }
 
@@ -57,16 +57,16 @@ TestPage.registerInitializer(function() {
         let testPageURL = WI.networkManager.mainFrame.mainResource.url;
         let testPageResourcesURL = testPageURL.substring(0, testPageURL.lastIndexOf("/"));
 
-        for (let test of tests) {
-            let testName = test.substring(test.lastIndexOf("/") + 1);
-            let testURL = testPageResourcesURL + "/" + test;
-            suite.addTestCase({
-                name: suite.name + "." + testName,
-                test(resolve, reject) {
-                    runFormattingTest(mode, testName, testURL).then(resolve).catch(reject);
-                },
-                timeout: -1,
-            });
-        }
+        suite.addTestCase({
+            name: suite.name,
+            timeout: -1,
+            async test(resolve, reject) {
+                for (let test of tests) {
+                    let testName = test.substring(test.lastIndexOf("/") + 1);
+                    let testURL = testPageResourcesURL + "/" + test;
+                    await runFormattingTest(mode, testName, testURL);
+                }
+            }
+        });
     };
 });
index 20ade86..467c4fe 100644 (file)
@@ -109,10 +109,20 @@ function test()
     InspectorTest.assert(node.arguments[1].type === WI.ScriptSyntaxTree.NodeType.Literal);
     InspectorTest.log("passed CallExpression");
 
-    node = makeNode("try {} catch(e) {} ", false);
+    node = makeNode("try {} catch(e) {}", false);
+    InspectorTest.assert(node.type === WI.ScriptSyntaxTree.NodeType.TryStatement);
+    InspectorTest.assert(node.handler.type === WI.ScriptSyntaxTree.NodeType.CatchClause);
+    InspectorTest.assert(node.handler.param.type === WI.ScriptSyntaxTree.NodeType.Identifier);
+    InspectorTest.assert(!node.finalizer);
+    node = makeNode("try {} catch {}", false);
     InspectorTest.assert(node.type === WI.ScriptSyntaxTree.NodeType.TryStatement);
-    InspectorTest.log("passed TryStatement");
     InspectorTest.assert(node.handler.type === WI.ScriptSyntaxTree.NodeType.CatchClause);
+    InspectorTest.assert(!node.handler.param);
+    node = makeNode("try {} finally {}", false);
+    InspectorTest.assert(node.type === WI.ScriptSyntaxTree.NodeType.TryStatement);
+    InspectorTest.assert(!node.handler);
+    InspectorTest.assert(node.finalizer.type === WI.ScriptSyntaxTree.NodeType.BlockStatement);
+    InspectorTest.log("passed TryStatement");
     InspectorTest.log("passed CatchClause");
 
     node = makeNode("foo ? bar : baz;", true);
@@ -183,6 +193,7 @@ function test()
 
     node = makeNode("for(var x of {});", false);
     InspectorTest.assert(node.type === WI.ScriptSyntaxTree.NodeType.ForOfStatement);
+    InspectorTest.assert(!node.await);
     InspectorTest.assert(node.left);
     InspectorTest.assert(node.left.type === WI.ScriptSyntaxTree.NodeType.VariableDeclaration);
     InspectorTest.assert(node.right);
@@ -191,10 +202,16 @@ function test()
     InspectorTest.assert(node.body.type === WI.ScriptSyntaxTree.NodeType.EmptyStatement);
     node = makeNode("for(var {x} of {});", false);
     InspectorTest.assert(node.type === WI.ScriptSyntaxTree.NodeType.ForOfStatement);
+    InspectorTest.assert(!node.await);
     InspectorTest.assert(node.left);
     InspectorTest.assert(node.left.type === WI.ScriptSyntaxTree.NodeType.VariableDeclaration);
     InspectorTest.assert(node.left.declarations[0].id.type === WI.ScriptSyntaxTree.NodeType.ObjectPattern);
     InspectorTest.assert(node.left.declarations[0].id.properties[0].value.name === "x");
+    node = makeNode("async function foo() { for await (x of []); }", false);
+    InspectorTest.assert(node.type === WI.ScriptSyntaxTree.NodeType.FunctionDeclaration);
+    InspectorTest.assert(node.async);
+    InspectorTest.assert(node.body.body[0].type === WI.ScriptSyntaxTree.NodeType.ForOfStatement);
+    InspectorTest.assert(node.body.body[0].await);
     InspectorTest.log("passed ForOfStatement");
 
     node = makeNode("function foo(x,y){}", false);
index 71ff09a..523abe9 100644 (file)
@@ -1,3 +1,51 @@
+2019-08-15  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: Update Esprima to support modern JavaScript language features
+        https://bugs.webkit.org/show_bug.cgi?id=200796
+
+        Reviewed by Ross Kirsling.
+
+        Use a fork of Esprima to support modern JavaScript language features
+        while going through the process to upstream support:
+
+          ES2018 Feature: Async Iteration (for-await-of)
+          https://github.com/jquery/esprima/issues/1990
+
+          ES2019 Feature: Numeric Separator
+          https://github.com/jquery/esprima/issues/1989
+
+          ES2019 Feature: Optional catch binding
+          https://github.com/jquery/esprima/issues/1953
+
+          ES2020 Feature: BigInt
+          https://github.com/jquery/esprima/issues/1988
+
+        ESTree compatible AST changes are summarized as:
+
+          - CatchClause `param` property is now nullable
+          - ForOfStatement now has a boolean `await` property
+          - Literal can be a `"bigint"` type (works if the environment has BigInt or not)
+
+        The pretty printer only needed to have additional handling for `for-await-of`.
+
+        * UserInterface/External/Esprima/esprima.js:
+        New version. Typescript output expects a modern JavaScript environment
+        instead of just ES6.
+
+        * Tools/Formatting/index.html:
+        Update the formatting tool for easier use in case of errors.
+
+        * UserInterface/Models/ScriptSyntaxTree.js:
+        (WI.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
+
+        * UserInterface/Test/TestHarness.js:
+        (TestHarness.prototype.passOrFail):
+        Convenience for pass/fail with the same message based on a condition.
+
+        * UserInterface/Workers/Formatter/EsprimaFormatter.js:
+        (EsprimaFormatter.prototype._handleTokenAtNode):
+        Ensure a space after `await` in `for await` syntax.
+
 2019-08-15  Devin Rousso  <drousso@apple.com>
 
         Web Inspector: REGRESSION(r244268): "Show Scope Chain on pause" setting has no effect
index c024603..5fc0cf0 100644 (file)
@@ -55,6 +55,7 @@
         "logic-expressions.js",
         "ternary-expressions.js",
         "new-expression.js",
+        "numbers.js",
         "label-break-continue-block.js",
         "with-statement.js",
         "return-statement.js",
             let debugFormatter = new EsprimaFormatterDebug(cm.getValue(), currentSourceType());
             debugText = debugFormatter.debugText;
         } catch (error) {
-            debugText = "Parse error";
+            debugText = "Parse error: " + JSON.stringify(error, null, 2);
         }
 
         // Output the results.
 
             // Compare results.
             let pass = formatter.formattedText === expectedData;
-            results.push("/* " + (pass ? "PASS" : "FAIL") + ": " + test + " */");
+            results.push("/* " + (pass ? "PASS" : "!! FAIL") + ": " + test + " */");
 
             // Output failures to console.
             if (!pass) {
                 console.log("Test", test);
-                console.log("Formatted Output", formatter.formattedText.length);
+                console.log("Formatted Output", formatter.formattedText ? formatter.formattedText.length : null);
                 console.log(formatter.formattedText);
                 console.log("Expected Output", expectedData.length);
                 console.log(expectedData);
index 9c33b9d..004a785 100644 (file)
@@ -82,13 +82,13 @@ return /******/ (function(modules) { // webpackBootstrap
       THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     */
     Object.defineProperty(exports, "__esModule", { value: true });
-    var comment_handler_1 = __webpack_require__(1);
-    var jsx_parser_1 = __webpack_require__(3);
-    var parser_1 = __webpack_require__(8);
-    var tokenizer_1 = __webpack_require__(15);
+    const comment_handler_1 = __webpack_require__(1);
+    const jsx_parser_1 = __webpack_require__(3);
+    const parser_1 = __webpack_require__(8);
+    const tokenizer_1 = __webpack_require__(15);
     function parse(code, options, delegate) {
-        var commentHandler = null;
-        var proxyDelegate = function (node, metadata) {
+        let commentHandler = null;
+        const proxyDelegate = (node, metadata) => {
             if (delegate) {
                 delegate(node, metadata);
             }
@@ -96,11 +96,11 @@ return /******/ (function(modules) { // webpackBootstrap
                 commentHandler.visit(node, metadata);
             }
         };
-        var parserDelegate = (typeof delegate === 'function') ? proxyDelegate : null;
-        var collectComment = false;
+        let parserDelegate = (typeof delegate === 'function') ? proxyDelegate : null;
+        let collectComment = false;
         if (options) {
             collectComment = (typeof options.comment === 'boolean' && options.comment);
-            var attachComment = (typeof options.attachComment === 'boolean' && options.attachComment);
+            const attachComment = (typeof options.attachComment === 'boolean' && options.attachComment);
             if (collectComment || attachComment) {
                 commentHandler = new comment_handler_1.CommentHandler();
                 commentHandler.attach = attachComment;
@@ -108,19 +108,19 @@ return /******/ (function(modules) { // webpackBootstrap
                 parserDelegate = proxyDelegate;
             }
         }
-        var isModule = false;
+        let isModule = false;
         if (options && typeof options.sourceType === 'string') {
             isModule = (options.sourceType === 'module');
         }
-        var parser;
+        let parser;
         if (options && typeof options.jsx === 'boolean' && options.jsx) {
             parser = new jsx_parser_1.JSXParser(code, options, parserDelegate);
         }
         else {
             parser = new parser_1.Parser(code, options, parserDelegate);
         }
-        var program = isModule ? parser.parseModule() : parser.parseScript();
-        var ast = program;
+        const program = isModule ? parser.parseModule() : parser.parseScript();
+        const ast = program;
         if (collectComment && commentHandler) {
             ast.comments = commentHandler.comments;
         }
@@ -134,24 +134,24 @@ return /******/ (function(modules) { // webpackBootstrap
     }
     exports.parse = parse;
     function parseModule(code, options, delegate) {
-        var parsingOptions = options || {};
+        const parsingOptions = options || {};
         parsingOptions.sourceType = 'module';
         return parse(code, parsingOptions, delegate);
     }
     exports.parseModule = parseModule;
     function parseScript(code, options, delegate) {
-        var parsingOptions = options || {};
+        const parsingOptions = options || {};
         parsingOptions.sourceType = 'script';
         return parse(code, parsingOptions, delegate);
     }
     exports.parseScript = parseScript;
     function tokenize(code, options, delegate) {
-        var tokenizer = new tokenizer_1.Tokenizer(code, options);
-        var tokens;
+        const tokenizer = new tokenizer_1.Tokenizer(code, options);
+        let tokens;
         tokens = [];
         try {
             while (true) {
-                var token = tokenizer.getNextToken();
+                let token = tokenizer.getNextToken();
                 if (!token) {
                     break;
                 }
@@ -182,22 +182,22 @@ return /******/ (function(modules) { // webpackBootstrap
 
     "use strict";
     Object.defineProperty(exports, "__esModule", { value: true });
-    var syntax_1 = __webpack_require__(2);
-    var CommentHandler = /** @class */ (function () {
-        function CommentHandler() {
+    const syntax_1 = __webpack_require__(2);
+    class CommentHandler {
+        constructor() {
             this.attach = false;
             this.comments = [];
             this.stack = [];
             this.leading = [];
             this.trailing = [];
         }
-        CommentHandler.prototype.insertInnerComments = function (node, metadata) {
+        insertInnerComments(node, metadata) {
             //  innnerComments for properties empty block
             //  `function a() {/** comments **\/}`
             if (node.type === syntax_1.Syntax.BlockStatement && node.body.length === 0) {
-                var innerComments = [];
-                for (var i = this.leading.length - 1; i >= 0; --i) {
-                    var entry = this.leading[i];
+                const innerComments = [];
+                for (let i = this.leading.length - 1; i >= 0; --i) {
+                    const entry = this.leading[i];
                     if (metadata.end.offset >= entry.start) {
                         innerComments.unshift(entry.comment);
                         this.leading.splice(i, 1);
@@ -208,12 +208,12 @@ return /******/ (function(modules) { // webpackBootstrap
                     node.innerComments = innerComments;
                 }
             }
-        };
-        CommentHandler.prototype.findTrailingComments = function (metadata) {
-            var trailingComments = [];
+        }
+        findTrailingComments(metadata) {
+            let trailingComments = [];
             if (this.trailing.length > 0) {
-                for (var i = this.trailing.length - 1; i >= 0; --i) {
-                    var entry = this.trailing[i];
+                for (let i = this.trailing.length - 1; i >= 0; --i) {
+                    const entry = this.trailing[i];
                     if (entry.start >= metadata.end.offset) {
                         trailingComments.unshift(entry.comment);
                     }
@@ -221,21 +221,21 @@ return /******/ (function(modules) { // webpackBootstrap
                 this.trailing.length = 0;
                 return trailingComments;
             }
-            var last = this.stack[this.stack.length - 1];
+            const last = this.stack[this.stack.length - 1];
             if (last && last.node.trailingComments) {
-                var firstComment = last.node.trailingComments[0];
+                const firstComment = last.node.trailingComments[0];
                 if (firstComment && firstComment.range[0] >= metadata.end.offset) {
                     trailingComments = last.node.trailingComments;
                     delete last.node.trailingComments;
                 }
             }
             return trailingComments;
-        };
-        CommentHandler.prototype.findLeadingComments = function (metadata) {
-            var leadingComments = [];
-            var target;
+        }
+        findLeadingComments(metadata) {
+            const leadingComments = [];
+            let target;
             while (this.stack.length > 0) {
-                var entry = this.stack[this.stack.length - 1];
+                const entry = this.stack[this.stack.length - 1];
                 if (entry && entry.start >= metadata.start.offset) {
                     target = entry.node;
                     this.stack.pop();
@@ -245,9 +245,9 @@ return /******/ (function(modules) { // webpackBootstrap
                 }
             }
             if (target) {
-                var count = target.leadingComments ? target.leadingComments.length : 0;
-                for (var i = count - 1; i >= 0; --i) {
-                    var comment = target.leadingComments[i];
+                const count = target.leadingComments ? target.leadingComments.length : 0;
+                for (let i = count - 1; i >= 0; --i) {
+                    const comment = target.leadingComments[i];
                     if (comment.range[1] <= metadata.start.offset) {
                         leadingComments.unshift(comment);
                         target.leadingComments.splice(i, 1);
@@ -258,22 +258,22 @@ return /******/ (function(modules) { // webpackBootstrap
                 }
                 return leadingComments;
             }
-            for (var i = this.leading.length - 1; i >= 0; --i) {
-                var entry = this.leading[i];
+            for (let i = this.leading.length - 1; i >= 0; --i) {
+                const entry = this.leading[i];
                 if (entry.start <= metadata.start.offset) {
                     leadingComments.unshift(entry.comment);
                     this.leading.splice(i, 1);
                 }
             }
             return leadingComments;
-        };
-        CommentHandler.prototype.visitNode = function (node, metadata) {
+        }
+        visitNode(node, metadata) {
             if (node.type === syntax_1.Syntax.Program && node.body.length > 0) {
                 return;
             }
             this.insertInnerComments(node, metadata);
-            var trailingComments = this.findTrailingComments(metadata);
-            var leadingComments = this.findLeadingComments(metadata);
+            const trailingComments = this.findTrailingComments(metadata);
+            const leadingComments = this.findLeadingComments(metadata);
             if (leadingComments.length > 0) {
                 node.leadingComments = leadingComments;
             }
@@ -284,10 +284,10 @@ return /******/ (function(modules) { // webpackBootstrap
                 node: node,
                 start: metadata.start.offset
             });
-        };
-        CommentHandler.prototype.visitComment = function (node, metadata) {
-            var type = (node.type[0] === 'L') ? 'Line' : 'Block';
-            var comment = {
+        }
+        visitComment(node, metadata) {
+            const type = (node.type[0] === 'L') ? 'Line' : 'Block';
+            const comment = {
                 type: type,
                 value: node.value
             };
@@ -299,7 +299,7 @@ return /******/ (function(modules) { // webpackBootstrap
             }
             this.comments.push(comment);
             if (this.attach) {
-                var entry = {
+                const entry = {
                     comment: {
                         type: type,
                         value: node.value,
@@ -314,8 +314,8 @@ return /******/ (function(modules) { // webpackBootstrap
                 this.leading.push(entry);
                 this.trailing.push(entry);
             }
-        };
-        CommentHandler.prototype.visit = function (node, metadata) {
+        }
+        visit(node, metadata) {
             if (node.type === 'LineComment') {
                 this.visitComment(node, metadata);
             }
@@ -325,9 +325,8 @@ return /******/ (function(modules) { // webpackBootstrap
             else if (this.attach) {
                 this.visitNode(node, metadata);
             }
-        };
-        return CommentHandler;
-    }());
+        }
+    }
     exports.CommentHandler = CommentHandler;
 
 
@@ -413,45 +412,31 @@ return /******/ (function(modules) { // webpackBootstrap
 /***/ function(module, exports, __webpack_require__) {
 
     "use strict";
-/* istanbul ignore next */
-    var __extends = (this && this.__extends) || (function () {
-        var extendStatics = function (d, b) {
-            extendStatics = Object.setPrototypeOf ||
-                ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
-                function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
-            return extendStatics(d, b);
-        };
-        return function (d, b) {
-            extendStatics(d, b);
-            function __() { this.constructor = d; }
-            d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
-        };
-    })();
     Object.defineProperty(exports, "__esModule", { value: true });
-    var character_1 = __webpack_require__(4);
-    var JSXNode = __webpack_require__(5);
-    var jsx_syntax_1 = __webpack_require__(6);
-    var Node = __webpack_require__(7);
-    var parser_1 = __webpack_require__(8);
-    var token_1 = __webpack_require__(13);
-    var xhtml_entities_1 = __webpack_require__(14);
+    const character_1 = __webpack_require__(4);
+    const JSXNode = __webpack_require__(5);
+    const jsx_syntax_1 = __webpack_require__(6);
+    const Node = __webpack_require__(7);
+    const parser_1 = __webpack_require__(8);
+    const token_1 = __webpack_require__(13);
+    const xhtml_entities_1 = __webpack_require__(14);
     token_1.TokenName[100 /* Identifier */] = 'JSXIdentifier';
     token_1.TokenName[101 /* Text */] = 'JSXText';
     // Fully qualified element name, e.g. <svg:path> returns "svg:path"
     function getQualifiedElementName(elementName) {
-        var qualifiedName;
+        let qualifiedName;
         switch (elementName.type) {
             case jsx_syntax_1.JSXSyntax.JSXIdentifier:
-                var id = elementName;
+                const id = elementName;
                 qualifiedName = id.name;
                 break;
             case jsx_syntax_1.JSXSyntax.JSXNamespacedName:
-                var ns = elementName;
+                const ns = elementName;
                 qualifiedName = getQualifiedElementName(ns.namespace) + ':' +
                     getQualifiedElementName(ns.name);
                 break;
             case jsx_syntax_1.JSXSyntax.JSXMemberExpression:
-                var expr = elementName;
+                const expr = elementName;
                 qualifiedName = getQualifiedElementName(expr.object) + '.' +
                     getQualifiedElementName(expr.property);
                 break;
@@ -461,55 +446,54 @@ return /******/ (function(modules) { // webpackBootstrap
         }
         return qualifiedName;
     }
-    var JSXParser = /** @class */ (function (_super) {
-        __extends(JSXParser, _super);
-        function JSXParser(code, options, delegate) {
-            return _super.call(this, code, options, delegate) || this;
+    class JSXParser extends parser_1.Parser {
+        constructor(code, options, delegate) {
+            super(code, options, delegate);
         }
-        JSXParser.prototype.parsePrimaryExpression = function () {
-            return this.match('<') ? this.parseJSXRoot() : _super.prototype.parsePrimaryExpression.call(this);
-        };
-        JSXParser.prototype.startJSX = function () {
+        parsePrimaryExpression() {
+            return this.match('<') ? this.parseJSXRoot() : super.parsePrimaryExpression();
+        }
+        startJSX() {
             // Unwind the scanner before the lookahead token.
             this.scanner.index = this.startMarker.index;
             this.scanner.lineNumber = this.startMarker.line;
             this.scanner.lineStart = this.startMarker.index - this.startMarker.column;
-        };
-        JSXParser.prototype.finishJSX = function () {
+        }
+        finishJSX() {
             // Prime the next lookahead.
             this.nextToken();
-        };
-        JSXParser.prototype.reenterJSX = function () {
+        }
+        reenterJSX() {
             this.startJSX();
             this.expectJSX('}');
             // Pop the closing '}' added from the lookahead.
             if (this.config.tokens) {
                 this.tokens.pop();
             }
-        };
-        JSXParser.prototype.createJSXNode = function () {
+        }
+        createJSXNode() {
             this.collectComments();
             return {
                 index: this.scanner.index,
                 line: this.scanner.lineNumber,
                 column: this.scanner.index - this.scanner.lineStart
             };
-        };
-        JSXParser.prototype.createJSXChildNode = function () {
+        }
+        createJSXChildNode() {
             return {
                 index: this.scanner.index,
                 line: this.scanner.lineNumber,
                 column: this.scanner.index - this.scanner.lineStart
             };
-        };
-        JSXParser.prototype.scanXHTMLEntity = function (quote) {
-            var result = '&';
-            var valid = true;
-            var terminated = false;
-            var numeric = false;
-            var hex = false;
+        }
+        scanXHTMLEntity(quote) {
+            let result = '&';
+            let valid = true;
+            let terminated = false;
+            let numeric = false;
+            let hex = false;
             while (!this.scanner.eof() && valid && !terminated) {
-                var ch = this.scanner.source[this.scanner.index];
+                const ch = this.scanner.source[this.scanner.index];
                 if (ch === quote) {
                     break;
                 }
@@ -539,7 +523,7 @@ return /******/ (function(modules) { // webpackBootstrap
             }
             if (valid && terminated && result.length > 2) {
                 // e.g. '&#x41;' becomes just '#x41'
-                var str = result.substr(1, result.length - 2);
+                const str = result.substr(1, result.length - 2);
                 if (numeric && str.length > 1) {
                     result = String.fromCharCode(parseInt(str.substr(1), 10));
                 }
@@ -551,13 +535,13 @@ return /******/ (function(modules) { // webpackBootstrap
                 }
             }
             return result;
-        };
+        }
         // Scan the next JSX token. This replaces Scanner#lex when in JSX mode.
-        JSXParser.prototype.lexJSX = function () {
-            var cp = this.scanner.source.charCodeAt(this.scanner.index);
+        lexJSX() {
+            const cp = this.scanner.source.charCodeAt(this.scanner.index);
             // < > / : = { }
             if (cp === 60 || cp === 62 || cp === 47 || cp === 58 || cp === 61 || cp === 123 || cp === 125) {
-                var value = this.scanner.source[this.scanner.index++];
+                const value = this.scanner.source[this.scanner.index++];
                 return {
                     type: 7 /* Punctuator */,
                     value: value,
@@ -569,11 +553,11 @@ return /******/ (function(modules) { // webpackBootstrap
             }
             // " '
             if (cp === 34 || cp === 39) {
-                var start = this.scanner.index;
-                var quote = this.scanner.source[this.scanner.index++];
-                var str = '';
+                const start = this.scanner.index;
+                const quote = this.scanner.source[this.scanner.index++];
+                let str = '';
                 while (!this.scanner.eof()) {
-                    var ch = this.scanner.source[this.scanner.index++];
+                    const ch = this.scanner.source[this.scanner.index++];
                     if (ch === quote) {
                         break;
                     }
@@ -595,10 +579,10 @@ return /******/ (function(modules) { // webpackBootstrap
             }
             // ... or .
             if (cp === 46) {
-                var n1 = this.scanner.source.charCodeAt(this.scanner.index + 1);
-                var n2 = this.scanner.source.charCodeAt(this.scanner.index + 2);
-                var value = (n1 === 46 && n2 === 46) ? '...' : '.';
-                var start = this.scanner.index;
+                const n1 = this.scanner.source.charCodeAt(this.scanner.index + 1);
+                const n2 = this.scanner.source.charCodeAt(this.scanner.index + 2);
+                const value = (n1 === 46 && n2 === 46) ? '...' : '.';
+                const start = this.scanner.index;
                 this.scanner.index += value.length;
                 return {
                     type: 7 /* Punctuator */,
@@ -623,10 +607,10 @@ return /******/ (function(modules) { // webpackBootstrap
             }
             // Identifer can not contain backslash (char code 92).
             if (character_1.Character.isIdentifierStart(cp) && (cp !== 92)) {
-                var start = this.scanner.index;
+                const start = this.scanner.index;
                 ++this.scanner.index;
                 while (!this.scanner.eof()) {
-                    var ch = this.scanner.source.charCodeAt(this.scanner.index);
+                    const ch = this.scanner.source.charCodeAt(this.scanner.index);
                     if (character_1.Character.isIdentifierPart(ch) && (ch !== 92)) {
                         ++this.scanner.index;
                     }
@@ -638,7 +622,7 @@ return /******/ (function(modules) { // webpackBootstrap
                         break;
                     }
                 }
-                var id = this.scanner.source.slice(start, this.scanner.index);
+                const id = this.scanner.source.slice(start, this.scanner.index);
                 return {
                     type: 100 /* Identifier */,
                     value: id,
@@ -649,13 +633,13 @@ return /******/ (function(modules) { // webpackBootstrap
                 };
             }
             return this.scanner.lex();
-        };
-        JSXParser.prototype.nextJSXToken = function () {
+        }
+        nextJSXToken() {
             this.collectComments();
             this.startMarker.index = this.scanner.index;
             this.startMarker.line = this.scanner.lineNumber;
             this.startMarker.column = this.scanner.index - this.scanner.lineStart;
-            var token = this.lexJSX();
+            const token = this.lexJSX();
             this.lastMarker.index = this.scanner.index;
             this.lastMarker.line = this.scanner.lineNumber;
             this.lastMarker.column = this.scanner.index - this.scanner.lineStart;
@@ -663,15 +647,15 @@ return /******/ (function(modules) { // webpackBootstrap
                 this.tokens.push(this.convertToken(token));
             }
             return token;
-        };
-        JSXParser.prototype.nextJSXText = function () {
+        }
+        nextJSXText() {
             this.startMarker.index = this.scanner.index;
             this.startMarker.line = this.scanner.lineNumber;
             this.startMarker.column = this.scanner.index - this.scanner.lineStart;
-            var start = this.scanner.index;
-            var text = '';
+            const start = this.scanner.index;
+            let text = '';
             while (!this.scanner.eof()) {
-                var ch = this.scanner.source[this.scanner.index];
+                const ch = this.scanner.source[this.scanner.index];
                 if (ch === '{' || ch === '<') {
                     break;
                 }
@@ -688,7 +672,7 @@ return /******/ (function(modules) { // webpackBootstrap
             this.lastMarker.index = this.scanner.index;
             this.lastMarker.line = this.scanner.lineNumber;
             this.lastMarker.column = this.scanner.index - this.scanner.lineStart;
-            var token = {
+            const token = {
                 type: 101 /* Text */,
                 value: text,
                 lineNumber: this.scanner.lineNumber,
@@ -700,163 +684,163 @@ return /******/ (function(modules) { // webpackBootstrap
                 this.tokens.push(this.convertToken(token));
             }
             return token;
-        };
-        JSXParser.prototype.peekJSXToken = function () {
-            var state = this.scanner.saveState();
+        }
+        peekJSXToken() {
+            const state = this.scanner.saveState();
             this.scanner.scanComments();
-            var next = this.lexJSX();
+            const next = this.lexJSX();
             this.scanner.restoreState(state);
             return next;
-        };
+        }
         // Expect the next JSX token to match the specified punctuator.
         // If not, an exception will be thrown.
-        JSXParser.prototype.expectJSX = function (value) {
-            var token = this.nextJSXToken();
+        expectJSX(value) {
+            const token = this.nextJSXToken();
             if (token.type !== 7 /* Punctuator */ || token.value !== value) {
                 this.throwUnexpectedToken(token);
             }
-        };
+        }
         // Return true if the next JSX token matches the specified punctuator.
-        JSXParser.prototype.matchJSX = function (value) {
-            var next = this.peekJSXToken();
+        matchJSX(value) {
+            const next = this.peekJSXToken();
             return next.type === 7 /* Punctuator */ && next.value === value;
-        };
-        JSXParser.prototype.parseJSXIdentifier = function () {
-            var node = this.createJSXNode();
-            var token = this.nextJSXToken();
+        }
+        parseJSXIdentifier() {
+            const node = this.createJSXNode();
+            const token = this.nextJSXToken();
             if (token.type !== 100 /* Identifier */) {
                 this.throwUnexpectedToken(token);
             }
             return this.finalize(node, new JSXNode.JSXIdentifier(token.value));
-        };
-        JSXParser.prototype.parseJSXElementName = function () {
-            var node = this.createJSXNode();
-            var elementName = this.parseJSXIdentifier();
+        }
+        parseJSXElementName() {
+            const node = this.createJSXNode();
+            let elementName = this.parseJSXIdentifier();
             if (this.matchJSX(':')) {
-                var namespace = elementName;
+                const namespace = elementName;
                 this.expectJSX(':');
-                var name_1 = this.parseJSXIdentifier();
-                elementName = this.finalize(node, new JSXNode.JSXNamespacedName(namespace, name_1));
+                const name = this.parseJSXIdentifier();
+                elementName = this.finalize(node, new JSXNode.JSXNamespacedName(namespace, name));
             }
             else if (this.matchJSX('.')) {
                 while (this.matchJSX('.')) {
-                    var object = elementName;
+                    const object = elementName;
                     this.expectJSX('.');
-                    var property = this.parseJSXIdentifier();
+                    const property = this.parseJSXIdentifier();
                     elementName = this.finalize(node, new JSXNode.JSXMemberExpression(object, property));
                 }
             }
             return elementName;
-        };
-        JSXParser.prototype.parseJSXAttributeName = function () {
-            var node = this.createJSXNode();
-            var attributeName;
-            var identifier = this.parseJSXIdentifier();
+        }
+        parseJSXAttributeName() {
+            const node = this.createJSXNode();
+            let attributeName;
+            const identifier = this.parseJSXIdentifier();
             if (this.matchJSX(':')) {
-                var namespace = identifier;
+                const namespace = identifier;
                 this.expectJSX(':');
-                var name_2 = this.parseJSXIdentifier();
-                attributeName = this.finalize(node, new JSXNode.JSXNamespacedName(namespace, name_2));
+                const name = this.parseJSXIdentifier();
+                attributeName = this.finalize(node, new JSXNode.JSXNamespacedName(namespace, name));
             }
             else {
                 attributeName = identifier;
             }
             return attributeName;
-        };
-        JSXParser.prototype.parseJSXStringLiteralAttribute = function () {
-            var node = this.createJSXNode();
-            var token = this.nextJSXToken();
+        }
+        parseJSXStringLiteralAttribute() {
+            const node = this.createJSXNode();
+            const token = this.nextJSXToken();
             if (token.type !== 8 /* StringLiteral */) {
                 this.throwUnexpectedToken(token);
             }
-            var raw = this.getTokenRaw(token);
+            const raw = this.getTokenRaw(token);
             return this.finalize(node, new Node.Literal(token.value, raw));
-        };
-        JSXParser.prototype.parseJSXExpressionAttribute = function () {
-            var node = this.createJSXNode();
+        }
+        parseJSXExpressionAttribute() {
+            const node = this.createJSXNode();
             this.expectJSX('{');
             this.finishJSX();
             if (this.match('}')) {
                 this.tolerateError('JSX attributes must only be assigned a non-empty expression');
             }
-            var expression = this.parseAssignmentExpression();
+            const expression = this.parseAssignmentExpression();
             this.reenterJSX();
             return this.finalize(node, new JSXNode.JSXExpressionContainer(expression));
-        };
-        JSXParser.prototype.parseJSXAttributeValue = function () {
+        }
+        parseJSXAttributeValue() {
             return this.matchJSX('{') ? this.parseJSXExpressionAttribute() :
                 this.matchJSX('<') ? this.parseJSXElement() : this.parseJSXStringLiteralAttribute();
-        };
-        JSXParser.prototype.parseJSXNameValueAttribute = function () {
-            var node = this.createJSXNode();
-            var name = this.parseJSXAttributeName();
-            var value = null;
+        }
+        parseJSXNameValueAttribute() {
+            const node = this.createJSXNode();
+            const name = this.parseJSXAttributeName();
+            let value = null;
             if (this.matchJSX('=')) {
                 this.expectJSX('=');
                 value = this.parseJSXAttributeValue();
             }
             return this.finalize(node, new JSXNode.JSXAttribute(name, value));
-        };
-        JSXParser.prototype.parseJSXSpreadAttribute = function () {
-            var node = this.createJSXNode();
+        }
+        parseJSXSpreadAttribute() {
+            const node = this.createJSXNode();
             this.expectJSX('{');
             this.expectJSX('...');
             this.finishJSX();
-            var argument = this.parseAssignmentExpression();
+            const argument = this.parseAssignmentExpression();
             this.reenterJSX();
             return this.finalize(node, new JSXNode.JSXSpreadAttribute(argument));
-        };
-        JSXParser.prototype.parseJSXAttributes = function () {
-            var attributes = [];
+        }
+        parseJSXAttributes() {
+            const attributes = [];
             while (!this.matchJSX('/') && !this.matchJSX('>')) {
-                var attribute = this.matchJSX('{') ? this.parseJSXSpreadAttribute() :
+                const attribute = this.matchJSX('{') ? this.parseJSXSpreadAttribute() :
                     this.parseJSXNameValueAttribute();
                 attributes.push(attribute);
             }
             return attributes;
-        };
-        JSXParser.prototype.parseJSXOpeningElement = function () {
-            var node = this.createJSXNode();
+        }
+        parseJSXOpeningElement() {
+            const node = this.createJSXNode();
             this.expectJSX('<');
-            var name = this.parseJSXElementName();
-            var attributes = this.parseJSXAttributes();
-            var selfClosing = this.matchJSX('/');
+            const name = this.parseJSXElementName();
+            const attributes = this.parseJSXAttributes();
+            const selfClosing = this.matchJSX('/');
             if (selfClosing) {
                 this.expectJSX('/');
             }
             this.expectJSX('>');
             return this.finalize(node, new JSXNode.JSXOpeningElement(name, selfClosing, attributes));
-        };
-        JSXParser.prototype.parseJSXBoundaryElement = function () {
-            var node = this.createJSXNode();
+        }
+        parseJSXBoundaryElement() {
+            const node = this.createJSXNode();
             this.expectJSX('<');
             if (this.matchJSX('/')) {
                 this.expectJSX('/');
-                var elementName = this.parseJSXElementName();
+                const elementName = this.parseJSXElementName();
                 this.expectJSX('>');
                 return this.finalize(node, new JSXNode.JSXClosingElement(elementName));
             }
-            var name = this.parseJSXElementName();
-            var attributes = this.parseJSXAttributes();
-            var selfClosing = this.matchJSX('/');
+            const name = this.parseJSXElementName();
+            const attributes = this.parseJSXAttributes();
+            const selfClosing = this.matchJSX('/');
             if (selfClosing) {
                 this.expectJSX('/');
             }
             this.expectJSX('>');
             return this.finalize(node, new JSXNode.JSXOpeningElement(name, selfClosing, attributes));
-        };
-        JSXParser.prototype.parseJSXEmptyExpression = function () {
-            var node = this.createJSXChildNode();
+        }
+        parseJSXEmptyExpression() {
+            const node = this.createJSXChildNode();
             this.collectComments();
             this.lastMarker.index = this.scanner.index;
             this.lastMarker.line = this.scanner.lineNumber;
             this.lastMarker.column = this.scanner.index - this.scanner.lineStart;
             return this.finalize(node, new JSXNode.JSXEmptyExpression());
-        };
-        JSXParser.prototype.parseJSXExpressionContainer = function () {
-            var node = this.createJSXNode();
+        }
+        parseJSXExpressionContainer() {
+            const node = this.createJSXNode();
             this.expectJSX('{');
-            var expression;
+            let expression;
             if (this.matchJSX('}')) {
                 expression = this.parseJSXEmptyExpression();
                 this.expectJSX('}');
@@ -867,19 +851,19 @@ return /******/ (function(modules) { // webpackBootstrap
                 this.reenterJSX();
             }
             return this.finalize(node, new JSXNode.JSXExpressionContainer(expression));
-        };
-        JSXParser.prototype.parseJSXChildren = function () {
-            var children = [];
+        }
+        parseJSXChildren() {
+            const children = [];
             while (!this.scanner.eof()) {
-                var node = this.createJSXChildNode();
-                var token = this.nextJSXText();
+                const node = this.createJSXChildNode();
+                const token = this.nextJSXText();
                 if (token.start < token.end) {
-                    var raw = this.getTokenRaw(token);
-                    var child = this.finalize(node, new JSXNode.JSXText(token.value, raw));
+                    const raw = this.getTokenRaw(token);
+                    const child = this.finalize(node, new JSXNode.JSXText(token.value, raw));
                     children.push(child);
                 }
                 if (this.scanner.source[this.scanner.index] === '{') {
-                    var container = this.parseJSXExpressionContainer();
+                    const container = this.parseJSXExpressionContainer();
                     children.push(container);
                 }
                 else {
@@ -887,33 +871,33 @@ return /******/ (function(modules) { // webpackBootstrap
                 }
             }
             return children;
-        };
-        JSXParser.prototype.parseComplexJSXElement = function (el) {
-            var stack = [];
+        }
+        parseComplexJSXElement(el) {
+            const stack = [];
             while (!this.scanner.eof()) {
                 el.children = el.children.concat(this.parseJSXChildren());
-                var node = this.createJSXChildNode();
-                var element = this.parseJSXBoundaryElement();
+                const node = this.createJSXChildNode();
+                const element = this.parseJSXBoundaryElement();
                 if (element.type === jsx_syntax_1.JSXSyntax.JSXOpeningElement) {
-                    var opening = element;
+                    const opening = element;
                     if (opening.selfClosing) {
-                        var child = this.finalize(node, new JSXNode.JSXElement(opening, [], null));
+                        const child = this.finalize(node, new JSXNode.JSXElement(opening, [], null));
                         el.children.push(child);
                     }
                     else {
                         stack.push(el);
-                        el = { node: node, opening: opening, closing: null, children: [] };
+                        el = { node, opening, closing: null, children: [] };
                     }
                 }
                 if (element.type === jsx_syntax_1.JSXSyntax.JSXClosingElement) {
                     el.closing = element;
-                    var open_1 = getQualifiedElementName(el.opening.name);
-                    var close_1 = getQualifiedElementName(el.closing.name);
-                    if (open_1 !== close_1) {
-                        this.tolerateError('Expected corresponding JSX closing tag for %0', open_1);
+                    const open = getQualifiedElementName(el.opening.name);
+                    const close = getQualifiedElementName(el.closing.name);
+                    if (open !== close) {
+                        this.tolerateError('Expected corresponding JSX closing tag for %0', open);
                     }
                     if (stack.length > 0) {
-                        var child = this.finalize(el.node, new JSXNode.JSXElement(el.opening, el.children, el.closing));
+                        const child = this.finalize(el.node, new JSXNode.JSXElement(el.opening, el.children, el.closing));
                         el = stack[stack.length - 1];
                         el.children.push(child);
                         stack.pop();
@@ -924,34 +908,33 @@ return /******/ (function(modules) { // webpackBootstrap
                 }
             }
             return el;
-        };
-        JSXParser.prototype.parseJSXElement = function () {
-            var node = this.createJSXNode();
-            var opening = this.parseJSXOpeningElement();
-            var children = [];
-            var closing = null;
+        }
+        parseJSXElement() {
+            const node = this.createJSXNode();
+            const opening = this.parseJSXOpeningElement();
+            let children = [];
+            let closing = null;
             if (!opening.selfClosing) {
-                var el = this.parseComplexJSXElement({ node: node, opening: opening, closing: closing, children: children });
+                const el = this.parseComplexJSXElement({ node, opening, closing, children });
                 children = el.children;
                 closing = el.closing;
             }
             return this.finalize(node, new JSXNode.JSXElement(opening, children, closing));
-        };
-        JSXParser.prototype.parseJSXRoot = function () {
+        }
+        parseJSXRoot() {
             // Pop the opening '<' added from the lookahead.
             if (this.config.tokens) {
                 this.tokens.pop();
             }
             this.startJSX();
-            var element = this.parseJSXElement();
+            const element = this.parseJSXElement();
             this.finishJSX();
             return element;
-        };
-        JSXParser.prototype.isStartOfExpression = function () {
-            return _super.prototype.isStartOfExpression.call(this) || this.match('<');
-        };
-        return JSXParser;
-    }(parser_1.Parser));
+        }
+        isStartOfExpression() {
+            return super.isStartOfExpression() || this.match('<');
+        }
+    }
     exports.JSXParser = JSXParser;
 
 
@@ -962,7 +945,7 @@ return /******/ (function(modules) { // webpackBootstrap
     "use strict";
     Object.defineProperty(exports, "__esModule", { value: true });
     // See also tools/generate-unicode-regex.js.
-    var Regex = {
+    const Regex = {
         // Unicode v12.1.0 NonAsciiIdentifierStart:
         NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7C6\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB67\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDEC0-\uDEEB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,
         // Unicode v12.1.0 NonAsciiIdentifierPart:
@@ -970,29 +953,29 @@ return /******/ (function(modules) { // webpackBootstrap
     };
     exports.Character = {
         /* tslint:disable:no-bitwise */
-        fromCodePoint: function (cp) {
+        fromCodePoint(cp) {
             return (cp < 0x10000) ? String.fromCharCode(cp) :
                 String.fromCharCode(0xD800 + ((cp - 0x10000) >> 10)) +
                     String.fromCharCode(0xDC00 + ((cp - 0x10000) & 1023));
         },
         // https://tc39.github.io/ecma262/#sec-white-space
-        isWhiteSpace: function (cp) {
+        isWhiteSpace(cp) {
             return (cp === 0x20) || (cp === 0x09) || (cp === 0x0B) || (cp === 0x0C) || (cp === 0xA0) ||
                 (cp >= 0x1680 && [0x1680, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF].indexOf(cp) >= 0);
         },
         // https://tc39.github.io/ecma262/#sec-line-terminators
-        isLineTerminator: function (cp) {
+        isLineTerminator(cp) {
             return (cp === 0x0A) || (cp === 0x0D) || (cp === 0x2028) || (cp === 0x2029);
         },
         // https://tc39.github.io/ecma262/#sec-names-and-keywords
-        isIdentifierStart: function (cp) {
+        isIdentifierStart(cp) {
             return (cp === 0x24) || (cp === 0x5F) || // $ (dollar) and _ (underscore)
                 (cp >= 0x41 && cp <= 0x5A) || // A..Z
                 (cp >= 0x61 && cp <= 0x7A) || // a..z
                 (cp === 0x5C) || // \ (backslash)
                 ((cp >= 0x80) && Regex.NonAsciiIdentifierStart.test(exports.Character.fromCodePoint(cp)));
         },
-        isIdentifierPart: function (cp) {
+        isIdentifierPart(cp) {
             return (cp === 0x24) || (cp === 0x5F) || // $ (dollar) and _ (underscore)
                 (cp >= 0x41 && cp <= 0x5A) || // A..Z
                 (cp >= 0x61 && cp <= 0x7A) || // a..z
@@ -1001,15 +984,15 @@ return /******/ (function(modules) { // webpackBootstrap
                 ((cp >= 0x80) && Regex.NonAsciiIdentifierPart.test(exports.Character.fromCodePoint(cp)));
         },
         // https://tc39.github.io/ecma262/#sec-literals-numeric-literals
-        isDecimalDigit: function (cp) {
+        isDecimalDigit(cp) {
             return (cp >= 0x30 && cp <= 0x39); // 0..9
         },
-        isHexDigit: function (cp) {
+        isHexDigit(cp) {
             return (cp >= 0x30 && cp <= 0x39) || // 0..9
                 (cp >= 0x41 && cp <= 0x46) || // A..F
                 (cp >= 0x61 && cp <= 0x66); // a..f
         },
-        isOctalDigit: function (cp) {
+        isOctalDigit(cp) {
             return (cp >= 0x30 && cp <= 0x37); // 0..7
         }
     };
@@ -1021,102 +1004,91 @@ return /******/ (function(modules) { // webpackBootstrap
 
     "use strict";
     Object.defineProperty(exports, "__esModule", { value: true });
-    var jsx_syntax_1 = __webpack_require__(6);
+    const jsx_syntax_1 = __webpack_require__(6);
     /* tslint:disable:max-classes-per-file */
-    var JSXClosingElement = /** @class */ (function () {
-        function JSXClosingElement(name) {
+    class JSXClosingElement {
+        constructor(name) {
             this.type = jsx_syntax_1.JSXSyntax.JSXClosingElement;
             this.name = name;
         }
-        return JSXClosingElement;
-    }());
+    }
     exports.JSXClosingElement = JSXClosingElement;
-    var JSXElement = /** @class */ (function () {
-        function JSXElement(openingElement, children, closingElement) {
+    class JSXElement {
+        constructor(openingElement, children, closingElement) {
             this.type = jsx_syntax_1.JSXSyntax.JSXElement;
             this.openingElement = openingElement;
             this.children = children;
             this.closingElement = closingElement;
         }
-        return JSXElement;
-    }());
+    }
     exports.JSXElement = JSXElement;
-    var JSXEmptyExpression = /** @class */ (function () {
-        function JSXEmptyExpression() {
+    class JSXEmptyExpression {
+        constructor() {
             this.type = jsx_syntax_1.JSXSyntax.JSXEmptyExpression;
         }
-        return JSXEmptyExpression;
-    }());
+    }
     exports.JSXEmptyExpression = JSXEmptyExpression;
-    var JSXExpressionContainer = /** @class */ (function () {
-        function JSXExpressionContainer(expression) {
+    class JSXExpressionContainer {
+        constructor(expression) {
             this.type = jsx_syntax_1.JSXSyntax.JSXExpressionContainer;
             this.expression = expression;
         }
-        return JSXExpressionContainer;
-    }());
+    }
     exports.JSXExpressionContainer = JSXExpressionContainer;
-    var JSXIdentifier = /** @class */ (function () {
-        function JSXIdentifier(name) {
+    class JSXIdentifier {
+        constructor(name) {
             this.type = jsx_syntax_1.JSXSyntax.JSXIdentifier;
             this.name = name;
         }
-        return JSXIdentifier;
-    }());
+    }
     exports.JSXIdentifier = JSXIdentifier;
-    var JSXMemberExpression = /** @class */ (function () {
-        function JSXMemberExpression(object, property) {
+    class JSXMemberExpression {
+        constructor(object, property) {
             this.type = jsx_syntax_1.JSXSyntax.JSXMemberExpression;
             this.object = object;
             this.property = property;
         }
-        return JSXMemberExpression;
-    }());
+    }
     exports.JSXMemberExpression = JSXMemberExpression;
-    var JSXAttribute = /** @class */ (function () {
-        function JSXAttribute(name, value) {
+    class JSXAttribute {
+        constructor(name, value) {
             this.type = jsx_syntax_1.JSXSyntax.JSXAttribute;
             this.name = name;
             this.value = value;
         }
-        return JSXAttribute;
-    }());
+    }
     exports.JSXAttribute = JSXAttribute;
-    var JSXNamespacedName = /** @class */ (function () {
-        function JSXNamespacedName(namespace, name) {
+    class JSXNamespacedName {
+        constructor(namespace, name) {
             this.type = jsx_syntax_1.JSXSyntax.JSXNamespacedName;
             this.namespace = namespace;
             this.name = name;
         }
-        return JSXNamespacedName;
-    }());
+    }
     exports.JSXNamespacedName = JSXNamespacedName;
-    var JSXOpeningElement = /** @class */ (function () {
-        function JSXOpeningElement(name, selfClosing, attributes) {
+    class JSXOpeningElement {
+        constructor(name, selfClosing, attributes) {
             this.type = jsx_syntax_1.JSXSyntax.JSXOpeningElement;
             this.name = name;
             this.selfClosing = selfClosing;
             this.attributes = attributes;
         }
-        return JSXOpeningElement;
-    }());
+    }
     exports.JSXOpeningElement = JSXOpeningElement;
-    var JSXSpreadAttribute = /** @class */ (function () {
-        function JSXSpreadAttribute(argument) {
+    class JSXSpreadAttribute {
+        constructor(argument) {
             this.type = jsx_syntax_1.JSXSyntax.JSXSpreadAttribute;
             this.argument = argument;
         }
-        return JSXSpreadAttribute;
-    }());
+    }
     exports.JSXSpreadAttribute = JSXSpreadAttribute;
-    var JSXText = /** @class */ (function () {
-        function JSXText(value, raw) {
+    class JSXText {
+        constructor(value, raw) {
             this.type = jsx_syntax_1.JSXSyntax.JSXText;
             this.value = value;
             this.raw = raw;
         }
-        return JSXText;
-    }());
+    }
     exports.JSXText = JSXText;
 
 
@@ -1147,26 +1119,24 @@ return /******/ (function(modules) { // webpackBootstrap
 
     "use strict";
     Object.defineProperty(exports, "__esModule", { value: true });
-    var syntax_1 = __webpack_require__(2);
+    const syntax_1 = __webpack_require__(2);
     /* tslint:disable:max-classes-per-file */
-    var ArrayExpression = /** @class */ (function () {
-        function ArrayExpression(elements) {
+    class ArrayExpression {
+        constructor(elements) {
             this.type = syntax_1.Syntax.ArrayExpression;
             this.elements = elements;
         }
-        return ArrayExpression;
-    }());
+    }
     exports.ArrayExpression = ArrayExpression;
-    var ArrayPattern = /** @class */ (function () {
-        function ArrayPattern(elements) {
+    class ArrayPattern {
+        constructor(elements) {
             this.type = syntax_1.Syntax.ArrayPattern;
             this.elements = elements;
         }
-        return ArrayPattern;
-    }());
+    }
     exports.ArrayPattern = ArrayPattern;
-    var ArrowFunctionExpression = /** @class */ (function () {
-        function ArrowFunctionExpression(params, body, expression) {
+    class ArrowFunctionExpression {
+        constructor(params, body, expression) {
             this.type = syntax_1.Syntax.ArrowFunctionExpression;
             this.id = null;
             this.params = params;
@@ -1175,30 +1145,27 @@ return /******/ (function(modules) { // webpackBootstrap
             this.expression = expression;
             this.async = false;
         }
-        return ArrowFunctionExpression;
-    }());
+    }
     exports.ArrowFunctionExpression = ArrowFunctionExpression;
-    var AssignmentExpression = /** @class */ (function () {
-        function AssignmentExpression(operator, left, right) {
+    class AssignmentExpression {
+        constructor(operator, left, right) {
             this.type = syntax_1.Syntax.AssignmentExpression;
             this.operator = operator;
             this.left = left;
             this.right = right;
         }
-        return AssignmentExpression;
-    }());
+    }
     exports.AssignmentExpression = AssignmentExpression;
-    var AssignmentPattern = /** @class */ (function () {
-        function AssignmentPattern(left, right) {
+    class AssignmentPattern {
+        constructor(left, right) {
             this.type = syntax_1.Syntax.AssignmentPattern;
             this.left = left;
             this.right = right;
         }
-        return AssignmentPattern;
-    }());
+    }
     exports.AssignmentPattern = AssignmentPattern;
-    var AsyncArrowFunctionExpression = /** @class */ (function () {
-        function AsyncArrowFunctionExpression(params, body, expression) {
+    class AsyncArrowFunctionExpression {
+        constructor(params, body, expression) {
             this.type = syntax_1.Syntax.ArrowFunctionExpression;
             this.id = null;
             this.params = params;
@@ -1207,253 +1174,236 @@ return /******/ (function(modules) { // webpackBootstrap
             this.expression = expression;
             this.async = true;
         }
-        return AsyncArrowFunctionExpression;
-    }());
+    }
     exports.AsyncArrowFunctionExpression = AsyncArrowFunctionExpression;
-    var AsyncFunctionDeclaration = /** @class */ (function () {
-        function AsyncFunctionDeclaration(id, params, body) {
+    class AsyncFunctionDeclaration {
+        constructor(id, params, body, generator) {
             this.type = syntax_1.Syntax.FunctionDeclaration;
             this.id = id;
             this.params = params;
             this.body = body;
-            this.generator = false;
+            this.generator = generator;
             this.expression = false;
             this.async = true;
         }
-        return AsyncFunctionDeclaration;
-    }());
+    }
     exports.AsyncFunctionDeclaration = AsyncFunctionDeclaration;
-    var AsyncFunctionExpression = /** @class */ (function () {
-        function AsyncFunctionExpression(id, params, body) {
+    class AsyncFunctionExpression {
+        constructor(id, params, body, generator) {
             this.type = syntax_1.Syntax.FunctionExpression;
             this.id = id;
             this.params = params;
             this.body = body;
-            this.generator = false;
+            this.generator = generator;
             this.expression = false;
             this.async = true;
         }
-        return AsyncFunctionExpression;
-    }());
+    }
     exports.AsyncFunctionExpression = AsyncFunctionExpression;
-    var AwaitExpression = /** @class */ (function () {
-        function AwaitExpression(argument) {
+    class AwaitExpression {
+        constructor(argument) {
             this.type = syntax_1.Syntax.AwaitExpression;
             this.argument = argument;
         }
-        return AwaitExpression;
-    }());
+    }
     exports.AwaitExpression = AwaitExpression;
-    var BinaryExpression = /** @class */ (function () {
-        function BinaryExpression(operator, left, right) {
-            var logical = (operator === '||' || operator === '&&');
+    class BigIntLiteral {
+        constructor(value, bigint, raw) {
+            this.type = syntax_1.Syntax.Literal;
+            this.value = value;
+            this.bigint = bigint;
+            this.raw = raw;
+        }
+    }
+    exports.BigIntLiteral = BigIntLiteral;
+    class BinaryExpression {
+        constructor(operator, left, right) {
+            const logical = (operator === '||' || operator === '&&');
             this.type = logical ? syntax_1.Syntax.LogicalExpression : syntax_1.Syntax.BinaryExpression;
             this.operator = operator;
             this.left = left;
             this.right = right;
         }
-        return BinaryExpression;
-    }());
+    }
     exports.BinaryExpression = BinaryExpression;
-    var BlockStatement = /** @class */ (function () {
-        function BlockStatement(body) {
+    class BlockStatement {
+        constructor(body) {
             this.type = syntax_1.Syntax.BlockStatement;
             this.body = body;
         }
-        return BlockStatement;
-    }());
+    }
     exports.BlockStatement = BlockStatement;
-    var BreakStatement = /** @class */ (function () {
-        function BreakStatement(label) {
+    class BreakStatement {
+        constructor(label) {
             this.type = syntax_1.Syntax.BreakStatement;
             this.label = label;
         }
-        return BreakStatement;
-    }());
+    }
     exports.BreakStatement = BreakStatement;
-    var CallExpression = /** @class */ (function () {
-        function CallExpression(callee, args) {
+    class CallExpression {
+        constructor(callee, args) {
             this.type = syntax_1.Syntax.CallExpression;
             this.callee = callee;
             this.arguments = args;
         }
-        return CallExpression;
-    }());
+    }
     exports.CallExpression = CallExpression;
-    var CatchClause = /** @class */ (function () {
-        function CatchClause(param, body) {
+    class CatchClause {
+        constructor(param, body) {
             this.type = syntax_1.Syntax.CatchClause;
             this.param = param;
             this.body = body;
         }
-        return CatchClause;
-    }());
+    }
     exports.CatchClause = CatchClause;
-    var ClassBody = /** @class */ (function () {
-        function ClassBody(body) {
+    class ClassBody {
+        constructor(body) {
             this.type = syntax_1.Syntax.ClassBody;
             this.body = body;
         }
-        return ClassBody;
-    }());
+    }
     exports.ClassBody = ClassBody;
-    var ClassDeclaration = /** @class */ (function () {
-        function ClassDeclaration(id, superClass, body) {
+    class ClassDeclaration {
+        constructor(id, superClass, body) {
             this.type = syntax_1.Syntax.ClassDeclaration;
             this.id = id;
             this.superClass = superClass;
             this.body = body;
         }
-        return ClassDeclaration;
-    }());
+    }
     exports.ClassDeclaration = ClassDeclaration;
-    var ClassExpression = /** @class */ (function () {
-        function ClassExpression(id, superClass, body) {
+    class ClassExpression {
+        constructor(id, superClass, body) {
             this.type = syntax_1.Syntax.ClassExpression;
             this.id = id;
             this.superClass = superClass;
             this.body = body;
         }
-        return ClassExpression;
-    }());
+    }
     exports.ClassExpression = ClassExpression;
-    var ComputedMemberExpression = /** @class */ (function () {
-        function ComputedMemberExpression(object, property) {
+    class ComputedMemberExpression {
+        constructor(object, property) {
             this.type = syntax_1.Syntax.MemberExpression;
             this.computed = true;
             this.object = object;
             this.property = property;
         }
-        return ComputedMemberExpression;
-    }());
+    }
     exports.ComputedMemberExpression = ComputedMemberExpression;
-    var ConditionalExpression = /** @class */ (function () {
-        function ConditionalExpression(test, consequent, alternate) {
+    class ConditionalExpression {
+        constructor(test, consequent, alternate) {
             this.type = syntax_1.Syntax.ConditionalExpression;
             this.test = test;
             this.consequent = consequent;
             this.alternate = alternate;
         }
-        return ConditionalExpression;
-    }());
+    }
     exports.ConditionalExpression = ConditionalExpression;
-    var ContinueStatement = /** @class */ (function () {
-        function ContinueStatement(label) {
+    class ContinueStatement {
+        constructor(label) {
             this.type = syntax_1.Syntax.ContinueStatement;
             this.label = label;
         }
-        return ContinueStatement;
-    }());
+    }
     exports.ContinueStatement = ContinueStatement;
-    var DebuggerStatement = /** @class */ (function () {
-        function DebuggerStatement() {
+    class DebuggerStatement {
+        constructor() {
             this.type = syntax_1.Syntax.DebuggerStatement;
         }
-        return DebuggerStatement;
-    }());
+    }
     exports.DebuggerStatement = DebuggerStatement;
-    var Directive = /** @class */ (function () {
-        function Directive(expression, directive) {
+    class Directive {
+        constructor(expression, directive) {
             this.type = syntax_1.Syntax.ExpressionStatement;
             this.expression = expression;
             this.directive = directive;
         }
-        return Directive;
-    }());
+    }
     exports.Directive = Directive;
-    var DoWhileStatement = /** @class */ (function () {
-        function DoWhileStatement(body, test) {
+    class DoWhileStatement {
+        constructor(body, test) {
             this.type = syntax_1.Syntax.DoWhileStatement;
             this.body = body;
             this.test = test;
         }
-        return DoWhileStatement;
-    }());
+    }
     exports.DoWhileStatement = DoWhileStatement;
-    var EmptyStatement = /** @class */ (function () {
-        function EmptyStatement() {
+    class EmptyStatement {
+        constructor() {
             this.type = syntax_1.Syntax.EmptyStatement;
         }
-        return EmptyStatement;
-    }());
+    }
     exports.EmptyStatement = EmptyStatement;
-    var ExportAllDeclaration = /** @class */ (function () {
-        function ExportAllDeclaration(source) {
+    class ExportAllDeclaration {
+        constructor(source) {
             this.type = syntax_1.Syntax.ExportAllDeclaration;
             this.source = source;
         }
-        return ExportAllDeclaration;
-    }());
+    }
     exports.ExportAllDeclaration = ExportAllDeclaration;
-    var ExportDefaultDeclaration = /** @class */ (function () {
-        function ExportDefaultDeclaration(declaration) {
+    class ExportDefaultDeclaration {
+        constructor(declaration) {
             this.type = syntax_1.Syntax.ExportDefaultDeclaration;
             this.declaration = declaration;
         }
-        return ExportDefaultDeclaration;
-    }());
+    }
     exports.ExportDefaultDeclaration = ExportDefaultDeclaration;
-    var ExportNamedDeclaration = /** @class */ (function () {
-        function ExportNamedDeclaration(declaration, specifiers, source) {
+    class ExportNamedDeclaration {
+        constructor(declaration, specifiers, source) {
             this.type = syntax_1.Syntax.ExportNamedDeclaration;
             this.declaration = declaration;
             this.specifiers = specifiers;
             this.source = source;
         }
-        return ExportNamedDeclaration;
-    }());
+    }
     exports.ExportNamedDeclaration = ExportNamedDeclaration;
-    var ExportSpecifier = /** @class */ (function () {
-        function ExportSpecifier(local, exported) {
+    class ExportSpecifier {
+        constructor(local, exported) {
             this.type = syntax_1.Syntax.ExportSpecifier;
             this.exported = exported;
             this.local = local;
         }
-        return ExportSpecifier;
-    }());
+    }
     exports.ExportSpecifier = ExportSpecifier;
-    var ExpressionStatement = /** @class */ (function () {
-        function ExpressionStatement(expression) {
+    class ExpressionStatement {
+        constructor(expression) {
             this.type = syntax_1.Syntax.ExpressionStatement;
             this.expression = expression;
         }
-        return ExpressionStatement;
-    }());
+    }
     exports.ExpressionStatement = ExpressionStatement;
-    var ForInStatement = /** @class */ (function () {
-        function ForInStatement(left, right, body) {
+    class ForInStatement {
+        constructor(left, right, body) {
             this.type = syntax_1.Syntax.ForInStatement;
             this.left = left;
             this.right = right;
             this.body = body;
             this.each = false;
         }
-        return ForInStatement;
-    }());
+    }
     exports.ForInStatement = ForInStatement;
-    var ForOfStatement = /** @class */ (function () {
-        function ForOfStatement(left, right, body) {
+    class ForOfStatement {
+        constructor(left, right, body, isAwait) {
             this.type = syntax_1.Syntax.ForOfStatement;
             this.left = left;
             this.right = right;
             this.body = body;
+            this.await = isAwait;
         }
-        return ForOfStatement;
-    }());
+    }
     exports.ForOfStatement = ForOfStatement;
-    var ForStatement = /** @class */ (function () {
-        function ForStatement(init, test, update, body) {
+    class ForStatement {
+        constructor(init, test, update, body) {
             this.type = syntax_1.Syntax.ForStatement;
             this.init = init;
             this.test = test;
             this.update = update;
             this.body = body;
         }
-        return ForStatement;
-    }());
+    }
     exports.ForStatement = ForStatement;
-    var FunctionDeclaration = /** @class */ (function () {
-        function FunctionDeclaration(id, params, body, generator) {
+    class FunctionDeclaration {
+        constructor(id, params, body, generator) {
             this.type = syntax_1.Syntax.FunctionDeclaration;
             this.id = id;
             this.params = params;
@@ -1462,11 +1412,10 @@ return /******/ (function(modules) { // webpackBootstrap
             this.expression = false;
             this.async = false;
         }
-        return FunctionDeclaration;
-    }());
+    }
     exports.FunctionDeclaration = FunctionDeclaration;
-    var FunctionExpression = /** @class */ (function () {
-        function FunctionExpression(id, params, body, generator) {
+    class FunctionExpression {
+        constructor(id, params, body, generator) {
             this.type = syntax_1.Syntax.FunctionExpression;
             this.id = id;
             this.params = params;
@@ -1475,97 +1424,86 @@ return /******/ (function(modules) { // webpackBootstrap
             this.expression = false;
             this.async = false;
         }
-        return FunctionExpression;
-    }());
+    }
     exports.FunctionExpression = FunctionExpression;
-    var Identifier = /** @class */ (function () {
-        function Identifier(name) {
+    class Identifier {
+        constructor(name) {
             this.type = syntax_1.Syntax.Identifier;
             this.name = name;
         }
-        return Identifier;
-    }());
+    }
     exports.Identifier = Identifier;
-    var IfStatement = /** @class */ (function () {
-        function IfStatement(test, consequent, alternate) {
+    class IfStatement {
+        constructor(test, consequent, alternate) {
             this.type = syntax_1.Syntax.IfStatement;
             this.test = test;
             this.consequent = consequent;
             this.alternate = alternate;
         }
-        return IfStatement;
-    }());
+    }
     exports.IfStatement = IfStatement;
-    var Import = /** @class */ (function () {
-        function Import() {
+    class Import {
+        constructor() {
             this.type = syntax_1.Syntax.Import;
         }
-        return Import;
-    }());
+    }
     exports.Import = Import;
-    var ImportDeclaration = /** @class */ (function () {
-        function ImportDeclaration(specifiers, source) {
+    class ImportDeclaration {
+        constructor(specifiers, source) {
             this.type = syntax_1.Syntax.ImportDeclaration;
             this.specifiers = specifiers;
             this.source = source;
         }
-        return ImportDeclaration;
-    }());
+    }
     exports.ImportDeclaration = ImportDeclaration;
-    var ImportDefaultSpecifier = /** @class */ (function () {
-        function ImportDefaultSpecifier(local) {
+    class ImportDefaultSpecifier {
+        constructor(local) {
             this.type = syntax_1.Syntax.ImportDefaultSpecifier;
             this.local = local;
         }
-        return ImportDefaultSpecifier;
-    }());
+    }
     exports.ImportDefaultSpecifier = ImportDefaultSpecifier;
-    var ImportNamespaceSpecifier = /** @class */ (function () {
-        function ImportNamespaceSpecifier(local) {
+    class ImportNamespaceSpecifier {
+        constructor(local) {
             this.type = syntax_1.Syntax.ImportNamespaceSpecifier;
             this.local = local;
         }
-        return ImportNamespaceSpecifier;
-    }());
+    }
     exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier;
-    var ImportSpecifier = /** @class */ (function () {
-        function ImportSpecifier(local, imported) {
+    class ImportSpecifier {
+        constructor(local, imported) {
             this.type = syntax_1.Syntax.ImportSpecifier;
             this.local = local;
             this.imported = imported;
         }
-        return ImportSpecifier;
-    }());
+    }
     exports.ImportSpecifier = ImportSpecifier;
-    var LabeledStatement = /** @class */ (function () {
-        function LabeledStatement(label, body) {
+    class LabeledStatement {
+        constructor(label, body) {
             this.type = syntax_1.Syntax.LabeledStatement;
             this.label = label;
             this.body = body;
         }
-        return LabeledStatement;
-    }());
+    }
     exports.LabeledStatement = LabeledStatement;
-    var Literal = /** @class */ (function () {
-        function Literal(value, raw) {
+    class Literal {
+        constructor(value, raw) {
             this.type = syntax_1.Syntax.Literal;
             this.value = value;
             this.raw = raw;
         }
-        return Literal;
-    }());
+    }
     exports.Literal = Literal;
-    var MetaProperty = /** @class */ (function () {
-        function MetaProperty(meta, property) {
+    class MetaProperty {
+        constructor(meta, property) {
             this.type = syntax_1.Syntax.MetaProperty;
             this.meta = meta;
             this.property = property;
         }
-        return MetaProperty;
-    }());
+    }
     exports.MetaProperty = MetaProperty;
-    var MethodDefinition = /** @class */ (function () {
-        function MethodDefinition(key, computed, value, kind, isStatic) {
+    class MethodDefinition {
+        constructor(key, computed, value, kind, isStatic) {
             this.type = syntax_1.Syntax.MethodDefinition;
             this.key = key;
             this.computed = computed;
@@ -1573,45 +1511,40 @@ return /******/ (function(modules) { // webpackBootstrap
             this.kind = kind;
             this.static = isStatic;
         }
-        return MethodDefinition;
-    }());
+    }
     exports.MethodDefinition = MethodDefinition;
-    var Module = /** @class */ (function () {
-        function Module(body) {
+    class Module {
+        constructor(body) {
             this.type = syntax_1.Syntax.Program;
             this.body = body;
             this.sourceType = 'module';
         }
-        return Module;
-    }());
+    }
     exports.Module = Module;
-    var NewExpression = /** @class */ (function () {
-        function NewExpression(callee, args) {
+    class NewExpression {
+        constructor(callee, args) {
             this.type = syntax_1.Syntax.NewExpression;
             this.callee = callee;
             this.arguments = args;
         }
-        return NewExpression;
-    }());
+    }
     exports.NewExpression = NewExpression;
-    var ObjectExpression = /** @class */ (function () {
-        function ObjectExpression(properties) {
+    class ObjectExpression {
+        constructor(properties) {
             this.type = syntax_1.Syntax.ObjectExpression;
             this.properties = properties;
         }
-        return ObjectExpression;
-    }());
+    }
     exports.ObjectExpression = ObjectExpression;
-    var ObjectPattern = /** @class */ (function () {
-        function ObjectPattern(properties) {
+    class ObjectPattern {
+        constructor(properties) {
             this.type = syntax_1.Syntax.ObjectPattern;
             this.properties = properties;
         }
-        return ObjectPattern;
-    }());
+    }
     exports.ObjectPattern = ObjectPattern;
-    var Property = /** @class */ (function () {
-        function Property(kind, key, computed, value, method, shorthand) {
+    class Property {
+        constructor(kind, key, computed, value, method, shorthand) {
             this.type = syntax_1.Syntax.Property;
             this.key = key;
             this.computed = computed;
@@ -1620,211 +1553,187 @@ return /******/ (function(modules) { // webpackBootstrap
             this.method = method;
             this.shorthand = shorthand;
         }
-        return Property;
-    }());
+    }
     exports.Property = Property;
-    var RegexLiteral = /** @class */ (function () {
-        function RegexLiteral(value, raw, pattern, flags) {
+    class RegexLiteral {
+        constructor(value, raw, pattern, flags) {
             this.type = syntax_1.Syntax.Literal;
             this.value = value;
             this.raw = raw;
-            this.regex = { pattern: pattern, flags: flags };
+            this.regex = { pattern, flags };
         }
-        return RegexLiteral;
-    }());
+    }
     exports.RegexLiteral = RegexLiteral;
-    var RestElement = /** @class */ (function () {
-        function RestElement(argument) {
+    class RestElement {
+        constructor(argument) {
             this.type = syntax_1.Syntax.RestElement;
             this.argument = argument;
         }
-        return RestElement;
-    }());
+    }
     exports.RestElement = RestElement;
-    var ReturnStatement = /** @class */ (function () {
-        function ReturnStatement(argument) {
+    class ReturnStatement {
+        constructor(argument) {
             this.type = syntax_1.Syntax.ReturnStatement;
             this.argument = argument;
         }
-        return ReturnStatement;
-    }());
+    }
     exports.ReturnStatement = ReturnStatement;
-    var Script = /** @class */ (function () {
-        function Script(body) {
+    class Script {
+        constructor(body) {
             this.type = syntax_1.Syntax.Program;
             this.body = body;
             this.sourceType = 'script';
         }
-        return Script;
-    }());
+    }
     exports.Script = Script;
-    var SequenceExpression = /** @class */ (function () {
-        function SequenceExpression(expressions) {
+    class SequenceExpression {
+        constructor(expressions) {
             this.type = syntax_1.Syntax.SequenceExpression;
             this.expressions = expressions;
         }
-        return SequenceExpression;
-    }());
+    }
     exports.SequenceExpression = SequenceExpression;
-    var SpreadElement = /** @class */ (function () {
-        function SpreadElement(argument) {
+    class SpreadElement {
+        constructor(argument) {
             this.type = syntax_1.Syntax.SpreadElement;
             this.argument = argument;
         }
-        return SpreadElement;
-    }());
+    }
     exports.SpreadElement = SpreadElement;
-    var StaticMemberExpression = /** @class */ (function () {
-        function StaticMemberExpression(object, property) {
+    class StaticMemberExpression {
+        constructor(object, property) {
             this.type = syntax_1.Syntax.MemberExpression;
             this.computed = false;
             this.object = object;
             this.property = property;
         }
-        return StaticMemberExpression;
-    }());
+    }
     exports.StaticMemberExpression = StaticMemberExpression;
-    var Super = /** @class */ (function () {
-        function Super() {
+    class Super {
+        constructor() {
             this.type = syntax_1.Syntax.Super;
         }
-        return Super;
-    }());
+    }
     exports.Super = Super;
-    var SwitchCase = /** @class */ (function () {
-        function SwitchCase(test, consequent) {
+    class SwitchCase {
+        constructor(test, consequent) {
             this.type = syntax_1.Syntax.SwitchCase;
             this.test = test;
             this.consequent = consequent;
         }
-        return SwitchCase;
-    }());
+    }
     exports.SwitchCase = SwitchCase;
-    var SwitchStatement = /** @class */ (function () {
-        function SwitchStatement(discriminant, cases) {
+    class SwitchStatement {
+        constructor(discriminant, cases) {
             this.type = syntax_1.Syntax.SwitchStatement;
             this.discriminant = discriminant;
             this.cases = cases;
         }
-        return SwitchStatement;
-    }());
+    }
     exports.SwitchStatement = SwitchStatement;
-    var TaggedTemplateExpression = /** @class */ (function () {
-        function TaggedTemplateExpression(tag, quasi) {
+    class TaggedTemplateExpression {
+        constructor(tag, quasi) {
             this.type = syntax_1.Syntax.TaggedTemplateExpression;
             this.tag = tag;
             this.quasi = quasi;
         }
-        return TaggedTemplateExpression;
-    }());
+    }
     exports.TaggedTemplateExpression = TaggedTemplateExpression;
-    var TemplateElement = /** @class */ (function () {
-        function TemplateElement(value, tail) {
+    class TemplateElement {
+        constructor(value, tail) {
             this.type = syntax_1.Syntax.TemplateElement;
             this.value = value;
             this.tail = tail;
         }
-        return TemplateElement;
-    }());
+    }
     exports.TemplateElement = TemplateElement;
-    var TemplateLiteral = /** @class */ (function () {
-        function TemplateLiteral(quasis, expressions) {
+    class TemplateLiteral {
+        constructor(quasis, expressions) {
             this.type = syntax_1.Syntax.TemplateLiteral;
             this.quasis = quasis;
             this.expressions = expressions;
         }
-        return TemplateLiteral;
-    }());
+    }
     exports.TemplateLiteral = TemplateLiteral;
-    var ThisExpression = /** @class */ (function () {
-        function ThisExpression() {
+    class ThisExpression {
+        constructor() {
             this.type = syntax_1.Syntax.ThisExpression;
         }
-        return ThisExpression;
-    }());
+    }
     exports.ThisExpression = ThisExpression;
-    var ThrowStatement = /** @class */ (function () {
-        function ThrowStatement(argument) {
+    class ThrowStatement {
+        constructor(argument) {
             this.type = syntax_1.Syntax.ThrowStatement;
             this.argument = argument;
         }
-        return ThrowStatement;
-    }());
+    }
     exports.ThrowStatement = ThrowStatement;
-    var TryStatement = /** @class */ (function () {
-        function TryStatement(block, handler, finalizer) {
+    class TryStatement {
+        constructor(block, handler, finalizer) {
             this.type = syntax_1.Syntax.TryStatement;
             this.block = block;
             this.handler = handler;
             this.finalizer = finalizer;
         }
-        return TryStatement;
-    }());
+    }
     exports.TryStatement = TryStatement;
-    var UnaryExpression = /** @class */ (function () {
-        function UnaryExpression(operator, argument) {
+    class UnaryExpression {
+        constructor(operator, argument) {
             this.type = syntax_1.Syntax.UnaryExpression;
             this.operator = operator;
             this.argument = argument;
             this.prefix = true;
         }
-        return UnaryExpression;
-    }());
+    }
     exports.UnaryExpression = UnaryExpression;
-    var UpdateExpression = /** @class */ (function () {
-        function UpdateExpression(operator, argument, prefix) {
+    class UpdateExpression {
+        constructor(operator, argument, prefix) {
             this.type = syntax_1.Syntax.UpdateExpression;
             this.operator = operator;
             this.argument = argument;
             this.prefix = prefix;
         }
-        return UpdateExpression;
-    }());
+    }
     exports.UpdateExpression = UpdateExpression;
-    var VariableDeclaration = /** @class */ (function () {
-        function VariableDeclaration(declarations, kind) {
+    class VariableDeclaration {
+        constructor(declarations, kind) {
             this.type = syntax_1.Syntax.VariableDeclaration;
             this.declarations = declarations;
             this.kind = kind;
         }
-        return VariableDeclaration;
-    }());
+    }
     exports.VariableDeclaration = VariableDeclaration;
-    var VariableDeclarator = /** @class */ (function () {
-        function VariableDeclarator(id, init) {
+    class VariableDeclarator {
+        constructor(id, init) {
             this.type = syntax_1.Syntax.VariableDeclarator;
             this.id = id;
             this.init = init;
         }
-        return VariableDeclarator;
-    }());
+    }
     exports.VariableDeclarator = VariableDeclarator;
-    var WhileStatement = /** @class */ (function () {
-        function WhileStatement(test, body) {
+    class WhileStatement {
+        constructor(test, body) {
             this.type = syntax_1.Syntax.WhileStatement;
             this.test = test;
             this.body = body;
         }
-        return WhileStatement;
-    }());
+    }
     exports.WhileStatement = WhileStatement;
-    var WithStatement = /** @class */ (function () {
-        function WithStatement(object, body) {
+    class WithStatement {
+        constructor(object, body) {
             this.type = syntax_1.Syntax.WithStatement;
             this.object = object;
             this.body = body;
         }
-        return WithStatement;
-    }());
+    }
     exports.WithStatement = WithStatement;
-    var YieldExpression = /** @class */ (function () {
-        function YieldExpression(argument, delegate) {
+    class YieldExpression {
+        constructor(argument, delegate) {
             this.type = syntax_1.Syntax.YieldExpression;
             this.argument = argument;
             this.delegate = delegate;
         }
-        return YieldExpression;
-    }());
+    }
     exports.YieldExpression = YieldExpression;
 
 
@@ -1834,17 +1743,16 @@ return /******/ (function(modules) { // webpackBootstrap
 
     "use strict";
     Object.defineProperty(exports, "__esModule", { value: true });
-    var assert_1 = __webpack_require__(9);
-    var error_handler_1 = __webpack_require__(10);
-    var messages_1 = __webpack_require__(11);
-    var Node = __webpack_require__(7);
-    var scanner_1 = __webpack_require__(12);
-    var syntax_1 = __webpack_require__(2);
-    var token_1 = __webpack_require__(13);
-    var ArrowParameterPlaceHolder = 'ArrowParameterPlaceHolder';
-    var Parser = /** @class */ (function () {
-        function Parser(code, options, delegate) {
-            if (options === void 0) { options = {}; }
+    const assert_1 = __webpack_require__(9);
+    const error_handler_1 = __webpack_require__(10);
+    const messages_1 = __webpack_require__(11);
+    const Node = __webpack_require__(7);
+    const scanner_1 = __webpack_require__(12);
+    const syntax_1 = __webpack_require__(2);
+    const token_1 = __webpack_require__(13);
+    const ArrowParameterPlaceHolder = 'ArrowParameterPlaceHolder';
+    class Parser {
+        constructor(code, options = {}, delegate) {
             this.config = {
                 range: (typeof options.range === 'boolean') && options.range,
                 loc: (typeof options.loc === 'boolean') && options.loc,
@@ -1931,40 +1839,32 @@ return /******/ (function(modules) { // webpackBootstrap
                 column: this.scanner.index - this.scanner.lineStart
             };
         }
-        Parser.prototype.throwError = function (messageFormat) {
-            var values = [];
-            for (var _i = 1; _i < arguments.length; _i++) {
-                values[_i - 1] = arguments[_i];
-            }
-            var args = Array.prototype.slice.call(arguments, 1);
-            var msg = messageFormat.replace(/%(\d)/g, function (whole, idx) {
+        throwError(messageFormat, ...values) {
+            const args = Array.prototype.slice.call(arguments, 1);
+            const msg = messageFormat.replace(/%(\d)/g, (whole, idx) => {
                 assert_1.assert(idx < args.length, 'Message reference must be in range');
                 return args[idx];
             });
-            var index = this.lastMarker.index;
-            var line = this.lastMarker.line;
-            var column = this.lastMarker.column + 1;
+            const index = this.lastMarker.index;
+            const line = this.lastMarker.line;
+            const column = this.lastMarker.column + 1;
             throw this.errorHandler.createError(index, line, column, msg);
-        };
-        Parser.prototype.tolerateError = function (messageFormat) {
-            var values = [];
-            for (var _i = 1; _i < arguments.length; _i++) {
-                values[_i - 1] = arguments[_i];
-            }
-            var args = Array.prototype.slice.call(arguments, 1);
-            var msg = messageFormat.replace(/%(\d)/g, function (whole, idx) {
+        }
+        tolerateError(messageFormat, ...values) {
+            const args = Array.prototype.slice.call(arguments, 1);
+            const msg = messageFormat.replace(/%(\d)/g, (whole, idx) => {
                 assert_1.assert(idx < args.length, 'Message reference must be in range');
                 return args[idx];
             });
-            var index = this.lastMarker.index;
-            var line = this.scanner.lineNumber;
-            var column = this.lastMarker.column + 1;
+            const index = this.lastMarker.index;
+            const line = this.scanner.lineNumber;
+            const column = this.lastMarker.column + 1;
             this.errorHandler.tolerateError(index, line, column, msg);
-        };
+        }
         // Throw an exception because of the token.
-        Parser.prototype.unexpectedTokenError = function (token, message) {
-            var msg = message || messages_1.Messages.UnexpectedToken;
-            var value;
+        unexpectedTokenError(token, message) {
+            let msg = message || messages_1.Messages.UnexpectedToken;
+            let value;
             if (token) {
                 if (!message) {
                     msg = (token.type === 2 /* EOF */) ? messages_1.Messages.UnexpectedEOS :
@@ -1989,35 +1889,35 @@ return /******/ (function(modules) { // webpackBootstrap
             }
             msg = msg.replace('%0', value);
             if (token && typeof token.lineNumber === 'number') {
-                var index = token.start;
-                var line = token.lineNumber;
-                var lastMarkerLineStart = this.lastMarker.index - this.lastMarker.column;
-                var column = token.start - lastMarkerLineStart + 1;
+                const index = token.start;
+                const line = token.lineNumber;
+                const lastMarkerLineStart = this.lastMarker.index - this.lastMarker.column;
+                const column = token.start - lastMarkerLineStart + 1;
                 return this.errorHandler.createError(index, line, column, msg);
             }
             else {
-                var index = this.lastMarker.index;
-                var line = this.lastMarker.line;
-                var column = this.lastMarker.column + 1;
+                const index = this.lastMarker.index;
+                const line = this.lastMarker.line;
+                const column = this.lastMarker.column + 1;
                 return this.errorHandler.createError(index, line, column, msg);
             }
-        };
-        Parser.prototype.throwUnexpectedToken = function (token, message) {
+        }
+        throwUnexpectedToken(token, message) {
             throw this.unexpectedTokenError(token, message);
-        };
-        Parser.prototype.tolerateUnexpectedToken = function (token, message) {
+        }
+        tolerateUnexpectedToken(token, message) {
             this.errorHandler.tolerate(this.unexpectedTokenError(token, message));
-        };
-        Parser.prototype.collectComments = function () {
+        }
+        collectComments() {
             if (!this.config.comment) {
                 this.scanner.scanComments();
             }
             else {
-                var comments = this.scanner.scanComments();
+                const comments = this.scanner.scanComments();
                 if (comments.length > 0 && this.delegate) {
-                    for (var i = 0; i < comments.length; ++i) {
-                        var e = comments[i];
-                        var node = void 0;
+                    for (let i = 0; i < comments.length; ++i) {
+                        const e = comments[i];
+                        let node;
                         node = {
                             type: e.multiLine ? 'BlockComment' : 'LineComment',
                             value: this.scanner.source.slice(e.slice[0], e.slice[1])
@@ -2028,7 +1928,7 @@ return /******/ (function(modules) { // webpackBootstrap
                         if (this.config.loc) {
                             node.loc = e.loc;
                         }
-                        var metadata = {
+                        const metadata = {
                             start: {
                                 line: e.loc.start.line,
                                 column: e.loc.start.column,
@@ -2044,13 +1944,13 @@ return /******/ (function(modules) { // webpackBootstrap
                     }
                 }
             }
-        };
+        }
         // From internal representation to an external structure
-        Parser.prototype.getTokenRaw = function (token) {
+        getTokenRaw(token) {
             return this.scanner.source.slice(token.start, token.end);
-        };
-        Parser.prototype.convertToken = function (token) {
-            var t = {
+        }
+        convertToken(token) {
+            const t = {
                 type: token_1.TokenName[token.type],
                 value: this.getTokenRaw(token)
             };
@@ -2070,14 +1970,14 @@ return /******/ (function(modules) { // webpackBootstrap
                 };
             }
             if (token.type === 9 /* RegularExpression */) {
-                var pattern = token.pattern;
-                var flags = token.flags;
-                t.regex = { pattern: pattern, flags: flags };
+                const pattern = token.pattern;
+                const flags = token.flags;
+                t.regex = { pattern, flags };
             }
             return t;
-        };
-        Parser.prototype.nextToken = function () {
-            var token = this.lookahead;
+        }
+        nextToken() {
+            const token = this.lookahead;
             this.lastMarker.index = this.scanner.index;
             this.lastMarker.line = this.scanner.lineNumber;
             this.lastMarker.column = this.scanner.index - this.scanner.lineStart;
@@ -2087,7 +1987,7 @@ return /******/ (function(modules) { // webpackBootstrap
                 this.startMarker.line = this.scanner.lineNumber;
                 this.startMarker.column = this.scanner.index - this.scanner.lineStart;
             }
-            var next = this.scanner.lex();
+            const next = this.scanner.lex();
             this.hasLineTerminator = (token.lineNumber !== next.lineNumber);
             if (next && this.context.strict && next.type === 3 /* Identifier */) {
                 if (this.scanner.isStrictModeReservedWord(next.value)) {
@@ -2099,10 +1999,10 @@ return /******/ (function(modules) { // webpackBootstrap
                 this.tokens.push(this.convertToken(next));
             }
             return token;
-        };
-        Parser.prototype.nextRegexToken = function () {
+        }
+        nextRegexToken() {
             this.collectComments();
-            var token = this.scanner.scanRegExp();
+            const token = this.scanner.scanRegExp();
             if (this.config.tokens) {
                 // Pop the previous token, '/' or '/='
                 // This is added from the lookahead token.
@@ -2113,18 +2013,17 @@ return /******/ (function(modules) { // webpackBootstrap
             this.lookahead = token;
             this.nextToken();
             return token;
-        };
-        Parser.prototype.createNode = function () {
+        }
+        createNode() {
             return {
                 index: this.startMarker.index,
                 line: this.startMarker.line,
                 column: this.startMarker.column
             };
-        };
-        Parser.prototype.startNode = function (token, lastLineStart) {
-            if (lastLineStart === void 0) { lastLineStart = 0; }
-            var column = token.start - token.lineStart;
-            var line = token.lineNumber;
+        }
+        startNode(token, lastLineStart = 0) {
+            let column = token.start - token.lineStart;
+            let line = token.lineNumber;
             if (column < 0) {
                 column += lastLineStart;
                 line--;
@@ -2134,8 +2033,8 @@ return /******/ (function(modules) { // webpackBootstrap
                 line: line,
                 column: column
             };
-        };
-        Parser.prototype.finalize = function (marker, node) {
+        }
+        finalize(marker, node) {
             if (this.config.range) {
                 node.range = [marker.index, this.lastMarker.index];
             }
@@ -2155,7 +2054,7 @@ return /******/ (function(modules) { // webpackBootstrap
                 }
             }
             if (this.delegate) {
-                var metadata = {
+                const metadata = {
                     start: {
                         line: marker.line,
                         column: marker.column,
@@ -2170,19 +2069,19 @@ return /******/ (function(modules) { // webpackBootstrap
                 this.delegate(node, metadata);
             }
             return node;
-        };
+        }
         // Expect the next token to match the specified punctuator.
         // If not, an exception will be thrown.
-        Parser.prototype.expect = function (value) {
-            var token = this.nextToken();
+        expect(value) {
+            const token = this.nextToken();
             if (token.type !== 7 /* Punctuator */ || token.value !== value) {
                 this.throwUnexpectedToken(token);
             }
-        };
+        }
         // Quietly expect a comma when in tolerant mode, otherwise delegates to expect().
-        Parser.prototype.expectCommaSeparator = function () {
+        expectCommaSeparator() {
             if (this.config.tolerant) {
-                var token = this.lookahead;
+                const token = this.lookahead;
                 if (token.type === 7 /* Punctuator */ && token.value === ',') {
                     this.nextToken();
                 }
@@ -2197,34 +2096,34 @@ return /******/ (function(modules) { // webpackBootstrap
             else {
                 this.expect(',');
             }
-        };
+        }
         // Expect the next token to match the specified keyword.
         // If not, an exception will be thrown.
-        Parser.prototype.expectKeyword = function (keyword) {
-            var token = this.nextToken();
+        expectKeyword(keyword) {
+            const token = this.nextToken();
             if (token.type !== 4 /* Keyword */ || token.value !== keyword) {
                 this.throwUnexpectedToken(token);
             }
-        };
+        }
         // Return true if the next token matches the specified punctuator.
-        Parser.prototype.match = function (value) {
+        match(value) {
             return this.lookahead.type === 7 /* Punctuator */ && this.lookahead.value === value;
-        };
+        }
         // Return true if the next token matches the specified keyword
-        Parser.prototype.matchKeyword = function (keyword) {
+        matchKeyword(keyword) {
             return this.lookahead.type === 4 /* Keyword */ && this.lookahead.value === keyword;
-        };
+        }
         // Return true if the next token matches the specified contextual keyword
         // (where an identifier is sometimes a keyword depending on the context)
-        Parser.prototype.matchContextualKeyword = function (keyword) {
+        matchContextualKeyword(keyword) {
             return this.lookahead.type === 3 /* Identifier */ && this.lookahead.value === keyword;
-        };
+        }
         // Return true if the next token is an assignment operator
-        Parser.prototype.matchAssign = function () {
+        matchAssign() {
             if (this.lookahead.type !== 7 /* Punctuator */) {
                 return false;
             }
-            var op = this.lookahead.value;
+            const op = this.lookahead.value;
             return op === '=' ||
                 op === '*=' ||
                 op === '**=' ||
@@ -2238,7 +2137,7 @@ return /******/ (function(modules) { // webpackBootstrap
                 op === '&=' ||
                 op === '^=' ||
                 op === '|=';
-        };
+        }
         // Cover grammar support.
         //
         // When an assignment expression position starts with an left parenthesis, the determination of the type
@@ -2270,14 +2169,14 @@ return /******/ (function(modules) { // webpackBootstrap
         // inheritCoverGrammar function runs the given parse function with a new cover grammar context, and it propagates
         // the flags outside of the parser. This means the production the parser parses is used as a part of a potential
         // pattern. The CoverInitializedName check is deferred.
-        Parser.prototype.isolateCoverGrammar = function (parseFunction) {
-            var previousIsBindingElement = this.context.isBindingElement;
-            var previousIsAssignmentTarget = this.context.isAssignmentTarget;
-            var previousFirstCoverInitializedNameError = this.context.firstCoverInitializedNameError;
+        isolateCoverGrammar(parseFunction) {
+            const previousIsBindingElement = this.context.isBindingElement;
+            const previousIsAssignmentTarget = this.context.isAssignmentTarget;
+            const previousFirstCoverInitializedNameError = this.context.firstCoverInitializedNameError;
             this.context.isBindingElement = true;
             this.context.isAssignmentTarget = true;
             this.context.firstCoverInitializedNameError = null;
-            var result = parseFunction.call(this);
+            const result = parseFunction.call(this);
             if (this.context.firstCoverInitializedNameError !== null) {
                 this.throwUnexpectedToken(this.context.firstCoverInitializedNameError);
             }
@@ -2285,21 +2184,21 @@ return /******/ (function(modules) { // webpackBootstrap
             this.context.isAssignmentTarget = previousIsAssignmentTarget;
             this.context.firstCoverInitializedNameError = previousFirstCoverInitializedNameError;
             return result;
-        };
-        Parser.prototype.inheritCoverGrammar = function (parseFunction) {
-            var previousIsBindingElement = this.context.isBindingElement;
-            var previousIsAssignmentTarget = this.context.isAssignmentTarget;
-            var previousFirstCoverInitializedNameError = this.context.firstCoverInitializedNameError;
+        }
+        inheritCoverGrammar(parseFunction) {
+            const previousIsBindingElement = this.context.isBindingElement;
+            const previousIsAssignmentTarget = this.context.isAssignmentTarget;
+            const previousFirstCoverInitializedNameError = this.context.firstCoverInitializedNameError;
             this.context.isBindingElement = true;
             this.context.isAssignmentTarget = true;
             this.context.firstCoverInitializedNameError = null;
-            var result = parseFunction.call(this);
+            const result = parseFunction.call(this);
             this.context.isBindingElement = this.context.isBindingElement && previousIsBindingElement;
             this.context.isAssignmentTarget = this.context.isAssignmentTarget && previousIsAssignmentTarget;
             this.context.firstCoverInitializedNameError = previousFirstCoverInitializedNameError || this.context.firstCoverInitializedNameError;
             return result;
-        };
-        Parser.prototype.consumeSemicolon = function () {
+        }
+        consumeSemicolon() {
             if (this.match(';')) {
                 this.nextToken();
             }
@@ -2311,12 +2210,12 @@ return /******/ (function(modules) { // webpackBootstrap
                 this.lastMarker.line = this.startMarker.line;
                 this.lastMarker.column = this.startMarker.column;
             }
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-primary-expression
-        Parser.prototype.parsePrimaryExpression = function () {
-            var node = this.createNode();
-            var expr;
-            var token, raw;
+        parsePrimaryExpression() {
+            const node = this.createNode();
+            let expr;
+            let token, raw;
             switch (this.lookahead.type) {
                 case 3 /* Identifier */:
                     if ((this.context.isModule || this.context.await) && this.lookahead.value === 'await') {
@@ -2333,7 +2232,13 @@ return /******/ (function(modules) { // webpackBootstrap
                     this.context.isBindingElement = false;
                     token = this.nextToken();
                     raw = this.getTokenRaw(token);
-                    expr = this.finalize(node, new Node.Literal(token.value, raw));
+                    if (token.bigint) {
+                        const bigintString = token.value !== null ? token.value.toString() : /* istanbul ignore next */ this.scanner.source.slice(token.start, token.end - 1);
+                        expr = this.finalize(node, new Node.BigIntLiteral(token.value, bigintString, raw));
+                    }
+                    else {
+                        expr = this.finalize(node, new Node.Literal(token.value, raw));
+                    }
                     break;
                 case 1 /* BooleanLiteral */:
                     this.context.isAssignmentTarget = false;
@@ -2409,17 +2314,17 @@ return /******/ (function(modules) { // webpackBootstrap
                     expr = this.throwUnexpectedToken(this.nextToken());
             }
             return expr;
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-array-initializer
-        Parser.prototype.parseSpreadElement = function () {
-            var node = this.createNode();
+        parseSpreadElement() {
+            const node = this.createNode();
             this.expect('...');
-            var arg = this.inheritCoverGrammar(this.parseAssignmentExpression);
+            const arg = this.inheritCoverGrammar(this.parseAssignmentExpression);
             return this.finalize(node, new Node.SpreadElement(arg));
-        };
-        Parser.prototype.parseArrayInitializer = function () {
-            var node = this.createNode();
-            var elements = [];
+        }
+        parseArrayInitializer() {
+            const node = this.createNode();
+            const elements = [];
             this.expect('[');
             while (!this.match(']')) {
                 if (this.match(',')) {
@@ -2427,7 +2332,7 @@ return /******/ (function(modules) { // webpackBootstrap
                     elements.push(null);
                 }
                 else if (this.match('...')) {
-                    var element = this.parseSpreadElement();
+                    const element = this.parseSpreadElement();
                     if (!this.match(']')) {
                         this.context.isAssignmentTarget = false;
                         this.context.isBindingElement = false;
@@ -2444,15 +2349,15 @@ return /******/ (function(modules) { // webpackBootstrap
             }
             this.expect(']');
             return this.finalize(node, new Node.ArrayExpression(elements));
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-object-initializer
-        Parser.prototype.parsePropertyMethod = function (params) {
+        parsePropertyMethod(params) {
             this.context.isAssignmentTarget = false;
             this.context.isBindingElement = false;
-            var previousStrict = this.context.strict;
-            var previousAllowStrictDirective = this.context.allowStrictDirective;
+            const previousStrict = this.context.strict;
+            const previousAllowStrictDirective = this.context.allowStrictDirective;
             this.context.allowStrictDirective = params.simple;
-            var body = this.isolateCoverGrammar(this.parseFunctionSourceElements);
+            const body = this.isolateCoverGrammar(this.parseFunctionSourceElements);
             if (this.context.strict && params.firstRestricted) {
                 this.tolerateUnexpectedToken(params.firstRestricted, params.message);
             }
@@ -2462,40 +2367,40 @@ return /******/ (function(modules) { // webpackBootstrap
             this.context.strict = previousStrict;
             this.context.allowStrictDirective = previousAllowStrictDirective;
             return body;
-        };
-        Parser.prototype.parsePropertyMethodFunction = function () {
-            var isGenerator = false;
-            var node = this.createNode();
-            var previousAllowYield = this.context.allowYield;
+        }
+        parsePropertyMethodFunction() {
+            const isGenerator = false;
+            const node = this.createNode();
+            const previousAllowYield = this.context.allowYield;
             this.context.allowYield = true;
-            var params = this.parseFormalParameters();
-            var method = this.parsePropertyMethod(params);
+            const params = this.parseFormalParameters();
+            const method = this.parsePropertyMethod(params);
             this.context.allowYield = previousAllowYield;
             return this.finalize(node, new Node.FunctionExpression(null, params.params, method, isGenerator));
-        };
-        Parser.prototype.parsePropertyMethodAsyncFunction = function () {
-            var node = this.createNode();
-            var previousAllowYield = this.context.allowYield;
-            var previousAwait = this.context.await;
+        }
+        parsePropertyMethodAsyncFunction(isGenerator) {
+            const node = this.createNode();
+            const previousAllowYield = this.context.allowYield;
+            const previousAwait = this.context.await;
             this.context.allowYield = false;
             this.context.await = true;
-            var params = this.parseFormalParameters();
-            var method = this.parsePropertyMethod(params);
+            const params = this.parseFormalParameters();
+            const method = this.parsePropertyMethod(params);
             this.context.allowYield = previousAllowYield;
             this.context.await = previousAwait;
-            return this.finalize(node, new Node.AsyncFunctionExpression(null, params.params, method));
-        };
-        Parser.prototype.parseObjectPropertyKey = function () {
-            var node = this.createNode();
-            var token = this.nextToken();
-            var key;
+            return this.finalize(node, new Node.AsyncFunctionExpression(null, params.params, method, isGenerator));
+        }
+        parseObjectPropertyKey() {
+            const node = this.createNode();
+            const token = this.nextToken();
+            let key;
             switch (token.type) {
                 case 8 /* StringLiteral */:
                 case 6 /* NumericLiteral */:
                     if (this.context.strict && token.octal) {
                         this.tolerateUnexpectedToken(token, messages_1.Messages.StrictOctalLiteral);
                     }
-                    var raw = this.getTokenRaw(token);
+                    const raw = this.getTokenRaw(token);
                     key = this.finalize(node, new Node.Literal(token.value, raw));
                     break;
                 case 3 /* Identifier */:
@@ -2517,27 +2422,31 @@ return /******/ (function(modules) { // webpackBootstrap
                     key = this.throwUnexpectedToken(token);
             }
             return key;
-        };
-        Parser.prototype.isPropertyKey = function (key, value) {
+        }
+        isPropertyKey(key, value) {
             return (key.type === syntax_1.Syntax.Identifier && key.name === value) ||
                 (key.type === syntax_1.Syntax.Literal && key.value === value);
-        };
-        Parser.prototype.parseObjectProperty = function (hasProto) {
-            var node = this.createNode();
-            var token = this.lookahead;
-            var kind;
-            var key = null;
-            var value = null;
-            var computed = false;
-            var method = false;
-            var shorthand = false;
-            var isAsync = false;
+        }
+        parseObjectProperty(hasProto) {
+            const node = this.createNode();
+            const token = this.lookahead;
+            let kind;
+            let key = null;
+            let value = null;
+            let computed = false;
+            let method = false;
+            let shorthand = false;
+            let isAsync = false;
+            let isAsyncGenerator = false;
             if (token.type === 3 /* Identifier */) {
-                var id = token.value;
+                const id = token.value;
                 this.nextToken();
                 computed = this.match('[');
-                isAsync = !this.hasLineTerminator && (id === 'async') &&
-                    !this.match(':') && !this.match('(') && !this.match('*') && !this.match(',');
+                isAsync = !this.hasLineTerminator && (id === 'async') && !this.match(':') && !this.match('(') && !this.match(',');
+                isAsyncGenerator = this.match('*');
+                if (isAsyncGenerator) {
+                    this.nextToken();
+                }
                 key = isAsync ? this.parseObjectPropertyKey() : this.finalize(node, new Node.Identifier(id));
             }
             else if (this.match('*')) {
@@ -2547,7 +2456,7 @@ return /******/ (function(modules) { // webpackBootstrap
                 computed = this.match('[');
                 key = this.parseObjectPropertyKey();
             }
-            var lookaheadPropertyKey = this.qualifiedPropertyName(this.lookahead);
+            const lookaheadPropertyKey = this.qualifiedPropertyName(this.lookahead);
             if (token.type === 3 /* Identifier */ && !isAsync && token.value === 'get' && lookaheadPropertyKey) {
                 kind = 'get';
                 computed = this.match('[');
@@ -2584,16 +2493,16 @@ return /******/ (function(modules) { // webpackBootstrap
                     value = this.inheritCoverGrammar(this.parseAssignmentExpression);
                 }
                 else if (this.match('(')) {
-                    value = isAsync ? this.parsePropertyMethodAsyncFunction() : this.parsePropertyMethodFunction();
+                    value = isAsync ? this.parsePropertyMethodAsyncFunction(isAsyncGenerator) : this.parsePropertyMethodFunction();
                     method = true;
                 }
                 else if (token.type === 3 /* Identifier */) {
-                    var id = this.finalize(node, new Node.Identifier(token.value));
+                    const id = this.finalize(node, new Node.Identifier(token.value));
                     if (this.match('=')) {
                         this.context.firstCoverInitializedNameError = this.lookahead;
                         this.nextToken();
                         shorthand = true;
-                        var init = this.isolateCoverGrammar(this.parseAssignmentExpression);
+                        const init = this.isolateCoverGrammar(this.parseAssignmentExpression);
                         value = this.finalize(node, new Node.AssignmentPattern(id, init));
                     }
                     else {
@@ -2606,12 +2515,12 @@ return /******/ (function(modules) { // webpackBootstrap
                 }
             }
             return this.finalize(node, new Node.Property(kind, key, computed, value, method, shorthand));
-        };
-        Parser.prototype.parseObjectInitializer = function () {
-            var node = this.createNode();
+        }
+        parseObjectInitializer() {
+            const node = this.createNode();
             this.expect('{');
-            var properties = [];
-            var hasProto = { value: false };
+            const properties = [];
+            const hasProto = { value: false };
             while (!this.match('}')) {
                 properties.push(this.match('...') ? this.parseSpreadElement() : this.parseObjectProperty(hasProto));
                 if (!this.match('}')) {
@@ -2620,31 +2529,31 @@ return /******/ (function(modules) { // webpackBootstrap
             }
             this.expect('}');
             return this.finalize(node, new Node.ObjectExpression(properties));
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-template-literals
-        Parser.prototype.parseTemplateHead = function () {
+        parseTemplateHead() {
             assert_1.assert(this.lookahead.head, 'Template literal must start with a template head');
-            var node = this.createNode();
-            var token = this.nextToken();
-            var raw = token.value;
-            var cooked = token.cooked;
-            return this.finalize(node, new Node.TemplateElement({ raw: raw, cooked: cooked }, token.tail));
-        };
-        Parser.prototype.parseTemplateElement = function () {
+            const node = this.createNode();
+            const token = this.nextToken();
+            const raw = token.value;
+            const cooked = token.cooked;
+            return this.finalize(node, new Node.TemplateElement({ raw, cooked }, token.tail));
+        }
+        parseTemplateElement() {
             if (this.lookahead.type !== 10 /* Template */) {
                 this.throwUnexpectedToken();
             }
-            var node = this.createNode();
-            var token = this.nextToken();
-            var raw = token.value;
-            var cooked = token.cooked;
-            return this.finalize(node, new Node.TemplateElement({ raw: raw, cooked: cooked }, token.tail));
-        };
-        Parser.prototype.parseTemplateLiteral = function () {
-            var node = this.createNode();
-            var expressions = [];
-            var quasis = [];
-            var quasi = this.parseTemplateHead();
+            const node = this.createNode();
+            const token = this.nextToken();
+            const raw = token.value;
+            const cooked = token.cooked;
+            return this.finalize(node, new Node.TemplateElement({ raw, cooked }, token.tail));
+        }
+        parseTemplateLiteral() {
+            const node = this.createNode();
+            const expressions = [];
+            const quasis = [];
+            let quasi = this.parseTemplateHead();
             quasis.push(quasi);
             while (!quasi.tail) {
                 expressions.push(this.parseExpression());
@@ -2652,9 +2561,9 @@ return /******/ (function(modules) { // webpackBootstrap
                 quasis.push(quasi);
             }
             return this.finalize(node, new Node.TemplateLiteral(quasis, expressions));
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-grouping-operator
-        Parser.prototype.reinterpretExpressionAsPattern = function (expr) {
+        reinterpretExpressionAsPattern(expr) {
             switch (expr.type) {
                 case syntax_1.Syntax.Identifier:
                 case syntax_1.Syntax.MemberExpression:
@@ -2667,7 +2576,7 @@ return /******/ (function(modules) { // webpackBootstrap
                     break;
                 case syntax_1.Syntax.ArrayExpression:
                     expr.type = syntax_1.Syntax.ArrayPattern;
-                    for (var i = 0; i < expr.elements.length; i++) {
+                    for (let i = 0; i < expr.elements.length; i++) {
                         if (expr.elements[i] !== null) {
                             this.reinterpretExpressionAsPattern(expr.elements[i]);
                         }
@@ -2675,8 +2584,8 @@ return /******/ (function(modules) { // webpackBootstrap
                     break;
                 case syntax_1.Syntax.ObjectExpression:
                     expr.type = syntax_1.Syntax.ObjectPattern;
-                    for (var i = 0; i < expr.properties.length; i++) {
-                        var property = expr.properties[i];
+                    for (let i = 0; i < expr.properties.length; i++) {
+                        const property = expr.properties[i];
                         this.reinterpretExpressionAsPattern(property.type === syntax_1.Syntax.SpreadElement ? property : property.value);
                     }
                     break;
@@ -2689,9 +2598,9 @@ return /******/ (function(modules) { // webpackBootstrap
                     // Allow other node type for tolerant parsing.
                     break;
             }
-        };
-        Parser.prototype.parseGroupExpression = function () {
-            var expr;
+        }
+        parseGroupExpression() {
+            let expr;
             this.expect('(');
             if (this.match(')')) {
                 this.nextToken();
@@ -2705,8 +2614,8 @@ return /******/ (function(modules) { // webpackBootstrap
                 };
             }
             else {
-                var startToken = this.lookahead;
-                var params = [];
+                const startToken = this.lookahead;
+                const params = [];
                 if (this.match('...')) {
                     expr = this.parseRestElement(params);
                     this.expect(')');
@@ -2720,11 +2629,11 @@ return /******/ (function(modules) { // webpackBootstrap
                     };
                 }
                 else {
-                    var arrow = false;
+                    let arrow = false;
                     this.context.isBindingElement = true;
                     expr = this.inheritCoverGrammar(this.parseAssignmentExpression);
                     if (this.match(',')) {
-                        var expressions = [];
+                        const expressions = [];
                         this.context.isAssignmentTarget = false;
                         expressions.push(expr);
                         while (this.lookahead.type !== 2 /* EOF */) {
@@ -2734,7 +2643,7 @@ return /******/ (function(modules) { // webpackBootstrap
                             this.nextToken();
                             if (this.match(')')) {
                                 this.nextToken();
-                                for (var i = 0; i < expressions.length; i++) {
+                                for (let i = 0; i < expressions.length; i++) {
                                     this.reinterpretExpressionAsPattern(expressions[i]);
                                 }
                                 arrow = true;
@@ -2754,7 +2663,7 @@ return /******/ (function(modules) { // webpackBootstrap
                                     this.expect('=>');
                                 }
                                 this.context.isBindingElement = false;
-                                for (var i = 0; i < expressions.length; i++) {
+                                for (let i = 0; i < expressions.length; i++) {
                                     this.reinterpretExpressionAsPattern(expressions[i]);
                                 }
                                 arrow = true;
@@ -2791,14 +2700,14 @@ return /******/ (function(modules) { // webpackBootstrap
                                     this.throwUnexpectedToken(this.lookahead);
                                 }
                                 if (expr.type === syntax_1.Syntax.SequenceExpression) {
-                                    for (var i = 0; i < expr.expressions.length; i++) {
+                                    for (let i = 0; i < expr.expressions.length; i++) {
                                         this.reinterpretExpressionAsPattern(expr.expressions[i]);
                                     }
                                 }
                                 else {
                                     this.reinterpretExpressionAsPattern(expr);
                                 }
-                                var parameters = (expr.type === syntax_1.Syntax.SequenceExpression ? expr.expressions : [expr]);
+                                const parameters = (expr.type === syntax_1.Syntax.SequenceExpression ? expr.expressions : [expr]);
                                 expr = {
                                     type: ArrowParameterPlaceHolder,
                                     params: parameters,
@@ -2811,14 +2720,14 @@ return /******/ (function(modules) { // webpackBootstrap
                 }
             }
             return expr;
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-left-hand-side-expressions
-        Parser.prototype.parseArguments = function () {
+        parseArguments() {
             this.expect('(');
-            var args = [];
+            const args = [];
             if (!this.match(')')) {
                 while (true) {
-                    var expr = this.match('...') ? this.parseSpreadElement() :
+                    const expr = this.match('...') ? this.parseSpreadElement() :
                         this.isolateCoverGrammar(this.parseAssignmentExpression);
                     args.push(expr);
                     if (this.match(')')) {
@@ -2832,30 +2741,30 @@ return /******/ (function(modules) { // webpackBootstrap
             }
             this.expect(')');
             return args;
-        };
-        Parser.prototype.isIdentifierName = function (token) {
+        }
+        isIdentifierName(token) {
             return token.type === 3 /* Identifier */ ||
                 token.type === 4 /* Keyword */ ||
                 token.type === 1 /* BooleanLiteral */ ||
                 token.type === 5 /* NullLiteral */;
-        };
-        Parser.prototype.parseIdentifierName = function () {
-            var node = this.createNode();
-            var token = this.nextToken();
+        }
+        parseIdentifierName() {
+            const node = this.createNode();
+            const token = this.nextToken();
             if (!this.isIdentifierName(token)) {
                 this.throwUnexpectedToken(token);
             }
             return this.finalize(node, new Node.Identifier(token.value));
-        };
-        Parser.prototype.parseNewExpression = function () {
-            var node = this.createNode();
-            var id = this.parseIdentifierName();
+        }
+        parseNewExpression() {
+            const node = this.createNode();
+            const id = this.parseIdentifierName();
             assert_1.assert(id.name === 'new', 'New expression must start with `new`');
-            var expr;
+            let expr;
             if (this.match('.')) {
                 this.nextToken();
                 if (this.lookahead.type === 3 /* Identifier */ && this.context.inFunctionBody && this.lookahead.value === 'target') {
-                    var property = this.parseIdentifierName();
+                    const property = this.parseIdentifierName();
                     expr = new Node.MetaProperty(id, property);
                 }
                 else {
@@ -2866,25 +2775,25 @@ return /******/ (function(modules) { // webpackBootstrap
                 this.throwUnexpectedToken(this.lookahead);
             }
             else {
-                var callee = this.isolateCoverGrammar(this.parseLeftHandSideExpression);
-                var args = this.match('(') ? this.parseArguments() : [];
+                const callee = this.isolateCoverGrammar(this.parseLeftHandSideExpression);
+                const args = this.match('(') ? this.parseArguments() : [];
                 expr = new Node.NewExpression(callee, args);
                 this.context.isAssignmentTarget = false;
                 this.context.isBindingElement = false;
             }
             return this.finalize(node, expr);
-        };
-        Parser.prototype.parseAsyncArgument = function () {
-            var arg = this.parseAssignmentExpression();
+        }
+        parseAsyncArgument() {
+            const arg = this.parseAssignmentExpression();
             this.context.firstCoverInitializedNameError = null;
             return arg;
-        };
-        Parser.prototype.parseAsyncArguments = function () {
+        }
+        parseAsyncArguments() {
             this.expect('(');
-            var args = [];
+            const args = [];
             if (!this.match(')')) {
                 while (true) {
-                    var expr = this.match('...') ? this.parseSpreadElement() :
+                    const expr = this.match('...') ? this.parseSpreadElement() :
                         this.isolateCoverGrammar(this.parseAsyncArgument);
                     args.push(expr);
                     if (this.match(')')) {
@@ -2898,29 +2807,29 @@ return /******/ (function(modules) { // webpackBootstrap
             }
             this.expect(')');
             return args;
-        };
-        Parser.prototype.matchImportCall = function () {
-            var match = this.matchKeyword('import');
+        }
+        matchImportCall() {
+            let match = this.matchKeyword('import');
             if (match) {
-                var state = this.scanner.saveState();
+                const state = this.scanner.saveState();
                 this.scanner.scanComments();
-                var next = this.scanner.lex();
+                const next = this.scanner.lex();
                 this.scanner.restoreState(state);
                 match = (next.type === 7 /* Punctuator */) && (next.value === '(');
             }
             return match;
-        };
-        Parser.prototype.parseImportCall = function () {
-            var node = this.createNode();
+        }
+        parseImportCall() {
+            const node = this.createNode();
             this.expectKeyword('import');
             return this.finalize(node, new Node.Import());
-        };
-        Parser.prototype.parseLeftHandSideExpressionAllowCall = function () {
-            var startToken = this.lookahead;
-            var maybeAsync = this.matchContextualKeyword('async');
-            var previousAllowIn = this.context.allowIn;
+        }
+        parseLeftHandSideExpressionAllowCall() {
+            const startToken = this.lookahead;
+            const maybeAsync = this.matchContextualKeyword('async');
+            const previousAllowIn = this.context.allowIn;
             this.context.allowIn = true;
-            var expr;
+            let expr;
             if (this.matchKeyword('super') && this.context.inFunctionBody) {
                 expr = this.createNode();
                 this.nextToken();
@@ -2937,20 +2846,20 @@ return /******/ (function(modules) { // webpackBootstrap
                     this.context.isBindingElement = false;
                     this.context.isAssignmentTarget = true;
                     this.expect('.');
-                    var property = this.parseIdentifierName();
+                    const property = this.parseIdentifierName();
                     expr = this.finalize(this.startNode(startToken), new Node.StaticMemberExpression(expr, property));
                 }
                 else if (this.match('(')) {
-                    var asyncArrow = maybeAsync && (startToken.lineNumber === this.lookahead.lineNumber);
+                    const asyncArrow = maybeAsync && (startToken.lineNumber === this.lookahead.lineNumber);
                     this.context.isBindingElement = false;
                     this.context.isAssignmentTarget = false;
-                    var args = asyncArrow ? this.parseAsyncArguments() : this.parseArguments();
+                    const args = asyncArrow ? this.parseAsyncArguments() : this.parseArguments();
                     if (expr.type === syntax_1.Syntax.Import && args.length !== 1) {
                         this.tolerateError(messages_1.Messages.BadImportCallArity);
                     }
                     expr = this.finalize(this.startNode(startToken), new Node.CallExpression(expr, args));
                     if (asyncArrow && this.match('=>')) {
-                        for (var i = 0; i < args.length; ++i) {
+                        for (let i = 0; i < args.length; ++i) {
                             this.reinterpretExpressionAsPattern(args[i]);
                         }
                         expr = {
@@ -2964,12 +2873,12 @@ return /******/ (function(modules) { // webpackBootstrap
                     this.context.isBindingElement = false;
                     this.context.isAssignmentTarget = true;
                     this.expect('[');
-                    var property = this.isolateCoverGrammar(this.parseExpression);
+                    const property = this.isolateCoverGrammar(this.parseExpression);
                     this.expect(']');
                     expr = this.finalize(this.startNode(startToken), new Node.ComputedMemberExpression(expr, property));
                 }
                 else if (this.lookahead.type === 10 /* Template */ && this.lookahead.head) {
-                    var quasi = this.parseTemplateLiteral();
+                    const quasi = this.parseTemplateLiteral();
                     expr = this.finalize(this.startNode(startToken), new Node.TaggedTemplateExpression(expr, quasi));
                 }
                 else {
@@ -2978,26 +2887,26 @@ return /******/ (function(modules) { // webpackBootstrap
             }
             this.context.allowIn = previousAllowIn;
             return expr;
-        };
-        Parser.prototype.parseSuper = function () {
-            var node = this.createNode();
+        }
+        parseSuper() {
+            const node = this.createNode();
             this.expectKeyword('super');
             if (!this.match('[') && !this.match('.')) {
                 this.throwUnexpectedToken(this.lookahead);
             }
             return this.finalize(node, new Node.Super());
-        };
-        Parser.prototype.parseLeftHandSideExpression = function () {
+        }
+        parseLeftHandSideExpression() {
             assert_1.assert(this.context.allowIn, 'callee of new expression always allow in keyword.');
-            var node = this.startNode(this.lookahead);
-            var expr = (this.matchKeyword('super') && this.context.inFunctionBody) ? this.parseSuper() :
+            const node = this.startNode(this.lookahead);
+            let expr = (this.matchKeyword('super') && this.context.inFunctionBody) ? this.parseSuper() :
                 this.inheritCoverGrammar(this.matchKeyword('new') ? this.parseNewExpression : this.parsePrimaryExpression);
             while (true) {
                 if (this.match('[')) {
                     this.context.isBindingElement = false;
                     this.context.isAssignmentTarget = true;
                     this.expect('[');
-                    var property = this.isolateCoverGrammar(this.parseExpression);
+                    const property = this.isolateCoverGrammar(this.parseExpression);
                     this.expect(']');
                     expr = this.finalize(node, new Node.ComputedMemberExpression(expr, property));
                 }
@@ -3005,11 +2914,11 @@ return /******/ (function(modules) { // webpackBootstrap
                     this.context.isBindingElement = false;
                     this.context.isAssignmentTarget = true;
                     this.expect('.');
-                    var property = this.parseIdentifierName();
+                    const property = this.parseIdentifierName();
                     expr = this.finalize(node, new Node.StaticMemberExpression(expr, property));
                 }
                 else if (this.lookahead.type === 10 /* Template */ && this.lookahead.head) {
-                    var quasi = this.parseTemplateLiteral();
+                    const quasi = this.parseTemplateLiteral();
                     expr = this.finalize(node, new Node.TaggedTemplateExpression(expr, quasi));
                 }
                 else {
@@ -3017,14 +2926,14 @@ return /******/ (function(modules) { // webpackBootstrap
                 }
             }
             return expr;
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-update-expressions
-        Parser.prototype.parseUpdateExpression = function () {
-            var expr;
-            var startToken = this.lookahead;
+        parseUpdateExpression() {
+            let expr;
+            const startToken = this.lookahead;
             if (this.match('++') || this.match('--')) {
-                var node = this.startNode(startToken);
-                var token = this.nextToken();
+                const node = this.startNode(startToken);
+                const token = this.nextToken();
                 expr = this.inheritCoverGrammar(this.parseUnaryExpression);
                 if (this.context.strict && expr.type === syntax_1.Syntax.Identifier && this.scanner.isRestrictedWord(expr.name)) {
                     this.tolerateError(messages_1.Messages.StrictLHSPrefix);
@@ -3032,7 +2941,7 @@ return /******/ (function(modules) { // webpackBootstrap
                 if (!this.context.isAssignmentTarget) {
                     this.tolerateError(messages_1.Messages.InvalidLHSInAssignment);
                 }
-                var prefix = true;
+                const prefix = true;
                 expr = this.finalize(node, new Node.UpdateExpression(token.value, expr, prefix));
                 this.context.isAssignmentTarget = false;
                 this.context.isBindingElement = false;
@@ -3049,27 +2958,27 @@ return /******/ (function(modules) { // webpackBootstrap
                         }
                         this.context.isAssignmentTarget = false;
                         this.context.isBindingElement = false;
-                        var operator = this.nextToken().value;
-                        var prefix = false;
+                        const operator = this.nextToken().value;
+                        const prefix = false;
                         expr = this.finalize(this.startNode(startToken), new Node.UpdateExpression(operator, expr, prefix));
                     }
                 }
             }
             return expr;
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-unary-operators
-        Parser.prototype.parseAwaitExpression = function () {
-            var node = this.createNode();
+        parseAwaitExpression() {
+            const node = this.createNode();
             this.nextToken();
-            var argument = this.parseUnaryExpression();
+            const argument = this.parseUnaryExpression();
             return this.finalize(node, new Node.AwaitExpression(argument));
-        };
-        Parser.prototype.parseUnaryExpression = function () {
-            var expr;
+        }
+        parseUnaryExpression() {
+            let expr;
             if (this.match('+') || this.match('-') || this.match('~') || this.match('!') ||
                 this.matchKeyword('delete') || this.matchKeyword('void') || this.matchKeyword('typeof')) {
-                var node = this.startNode(this.lookahead);
-                var token = this.nextToken();
+                const node = this.startNode(this.lookahead);
+                const token = this.nextToken();
                 expr = this.inheritCoverGrammar(this.parseUnaryExpression);
                 expr = this.finalize(node, new Node.UnaryExpression(token.value, expr));
                 if (this.context.strict && expr.operator === 'delete' && expr.argument.type === syntax_1.Syntax.Identifier) {
@@ -3085,20 +2994,20 @@ return /******/ (function(modules) { // webpackBootstrap
                 expr = this.parseUpdateExpression();
             }
             return expr;
-        };
-        Parser.prototype.parseExponentiationExpression = function () {
-            var startToken = this.lookahead;
-            var expr = this.inheritCoverGrammar(this.parseUnaryExpression);
+        }
+        parseExponentiationExpression() {
+            const startToken = this.lookahead;
+            let expr = this.inheritCoverGrammar(this.parseUnaryExpression);
             if (expr.type !== syntax_1.Syntax.UnaryExpression && this.match('**')) {
                 this.nextToken();
                 this.context.isAssignmentTarget = false;
                 this.context.isBindingElement = false;
-                var left = expr;
-                var right = this.isolateCoverGrammar(this.parseExponentiationExpression);
+                const left = expr;
+                const right = this.isolateCoverGrammar(this.parseExponentiationExpression);
                 expr = this.finalize(this.startNode(startToken), new Node.BinaryExpression('**', left, right));
             }
             return expr;
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-exp-operator
         // https://tc39.github.io/ecma262/#sec-multiplicative-operators
         // https://tc39.github.io/ecma262/#sec-additive-operators
@@ -3107,9 +3016,9 @@ return /******/ (function(modules) { // webpackBootstrap
         // https://tc39.github.io/ecma262/#sec-equality-operators
         // https://tc39.github.io/ecma262/#sec-binary-bitwise-operators
         // https://tc39.github.io/ecma262/#sec-binary-logical-operators
-        Parser.prototype.binaryPrecedence = function (token) {
-            var op = token.value;
-            var precedence;
+        binaryPrecedence(token) {
+            const op = token.value;
+            let precedence;
             if (token.type === 7 /* Punctuator */) {
                 precedence = this.operatorPrecedence[op] || 0;
             }
@@ -3120,21 +3029,21 @@ return /******/ (function(modules) { // webpackBootstrap
                 precedence = 0;
             }
             return precedence;
-        };
-        Parser.prototype.parseBinaryExpression = function () {
-            var startToken = this.lookahead;
-            var expr = this.inheritCoverGrammar(this.parseExponentiationExpression);
-            var token = this.lookahead;
-            var prec = this.binaryPrecedence(token);
+        }
+        parseBinaryExpression() {
+            const startToken = this.lookahead;
+            let expr = this.inheritCoverGrammar(this.parseExponentiationExpression);
+            const token = this.lookahead;
+            let prec = this.binaryPrecedence(token);
             if (prec > 0) {
                 this.nextToken();
                 this.context.isAssignmentTarget = false;
                 this.context.isBindingElement = false;
-                var markers = [startToken, this.lookahead];
-                var left = expr;
-                var right = this.isolateCoverGrammar(this.parseExponentiationExpression);
-                var stack = [left, token.value, right];
-                var precedences = [prec];
+                const markers = [startToken, this.lookahead];
+                let left = expr;
+                let right = this.isolateCoverGrammar(this.parseExponentiationExpression);
+                const stack = [left, token.value, right];
+                const precedences = [prec];
                 while (true) {
                     prec = this.binaryPrecedence(this.lookahead);
                     if (prec <= 0) {
@@ -3143,11 +3052,11 @@ return /******/ (function(modules) { // webpackBootstrap
                     // Reduce: make a binary expression from the three topmost entries.
                     while ((stack.length > 2) && (prec <= precedences[precedences.length - 1])) {
                         right = stack.pop();
-                        var operator = stack.pop();
+                        const operator = stack.pop();
                         precedences.pop();
                         left = stack.pop();
                         markers.pop();
-                        var node = this.startNode(markers[markers.length - 1]);
+                        const node = this.startNode(markers[markers.length - 1]);
                         stack.push(this.finalize(node, new Node.BinaryExpression(operator, left, right)));
                     }
                     // Shift.
@@ -3157,41 +3066,41 @@ return /******/ (function(modules) { // webpackBootstrap
                     stack.push(this.isolateCoverGrammar(this.parseExponentiationExpression));
                 }
                 // Final reduce to clean-up the stack.
-                var i = stack.length - 1;
+                let i = stack.length - 1;
                 expr = stack[i];
-                var lastMarker = markers.pop();
+                let lastMarker = markers.pop();
                 while (i > 1) {
-                    var marker = markers.pop();
-                    var lastLineStart = lastMarker && lastMarker.lineStart;
-                    var node = this.startNode(marker, lastLineStart);
-                    var operator = stack[i - 1];
+                    const marker = markers.pop();
+                    const lastLineStart = lastMarker && lastMarker.lineStart;
+                    const node = this.startNode(marker, lastLineStart);
+                    const operator = stack[i - 1];
                     expr = this.finalize(node, new Node.BinaryExpression(operator, stack[i - 2], expr));
                     i -= 2;
                     lastMarker = marker;
                 }
             }
             return expr;
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-conditional-operator
-        Parser.prototype.parseConditionalExpression = function () {
-            var startToken = this.lookahead;
-            var expr = this.inheritCoverGrammar(this.parseBinaryExpression);
+        parseConditionalExpression() {
+            const startToken = this.lookahead;
+            let expr = this.inheritCoverGrammar(this.parseBinaryExpression);
             if (this.match('?')) {
                 this.nextToken();
-                var previousAllowIn = this.context.allowIn;
+                const previousAllowIn = this.context.allowIn;
                 this.context.allowIn = true;
-                var consequent = this.isolateCoverGrammar(this.parseAssignmentExpression);
+                const consequent = this.isolateCoverGrammar(this.parseAssignmentExpression);
                 this.context.allowIn = previousAllowIn;
                 this.expect(':');
-                var alternate = this.isolateCoverGrammar(this.parseAssignmentExpression);
+                const alternate = this.isolateCoverGrammar(this.parseAssignmentExpression);
                 expr = this.finalize(this.startNode(startToken), new Node.ConditionalExpression(expr, consequent, alternate));
                 this.context.isAssignmentTarget = false;
                 this.context.isBindingElement = false;
             }
             return expr;
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-assignment-operators
-        Parser.prototype.checkPatternParam = function (options, param) {
+        checkPatternParam(options, param) {
             switch (param.type) {
                 case syntax_1.Syntax.Identifier:
                     this.validateParam(options, param, param.name);
@@ -3203,15 +3112,15 @@ return /******/ (function(modules) { // webpackBootstrap
                     this.checkPatternParam(options, param.left);
                     break;
                 case syntax_1.Syntax.ArrayPattern:
-                    for (var i = 0; i < param.elements.length; i++) {
+                    for (let i = 0; i < param.elements.length; i++) {
                         if (param.elements[i] !== null) {
                             this.checkPatternParam(options, param.elements[i]);
                         }
                     }
                     break;
                 case syntax_1.Syntax.ObjectPattern:
-                    for (var i = 0; i < param.properties.length; i++) {
-                        var property = param.properties[i];
+                    for (let i = 0; i < param.properties.length; i++) {
+                        const property = param.properties[i];
                         this.checkPatternParam(options, (property.type === syntax_1.Syntax.RestElement) ? property : property.value);
                     }
                     break;
@@ -3219,11 +3128,11 @@ return /******/ (function(modules) { // webpackBootstrap
                     break;
             }
             options.simple = options.simple && (param instanceof Node.Identifier);
-        };
-        Parser.prototype.reinterpretAsCoverFormalsList = function (expr) {
-            var params = [expr];
-            var options;
-            var asyncArrow = false;
+        }
+        reinterpretAsCoverFormalsList(expr) {
+            let params = [expr];
+            let options;
+            let asyncArrow = false;
             switch (expr.type) {
                 case syntax_1.Syntax.Identifier:
                     break;
@@ -3238,8 +3147,8 @@ return /******/ (function(modules) { // webpackBootstrap
                 simple: true,
                 paramSet: {}
             };
-            for (var i = 0; i < params.length; ++i) {
-                var param = params[i];
+            for (let i = 0; i < params.length; ++i) {
+                const param = params[i];
                 if (param.type === syntax_1.Syntax.AssignmentPattern) {
                     if (param.right.type === syntax_1.Syntax.YieldExpression) {
                         if (param.right.argument) {
@@ -3258,15 +3167,15 @@ return /******/ (function(modules) { // webpackBootstrap
                 params[i] = param;
             }
             if (this.context.strict || !this.context.allowYield) {
-                for (var i = 0; i < params.length; ++i) {
-                    var param = params[i];
+                for (let i = 0; i < params.length; ++i) {
+                    const param = params[i];
                     if (param.type === syntax_1.Syntax.YieldExpression) {
                         this.throwUnexpectedToken(this.lookahead);
                     }
                 }
             }
             if (options.message === messages_1.Messages.StrictParamDupe) {
-                var token = this.context.strict ? options.stricted : options.firstRestricted;
+                const token = this.context.strict ? options.stricted : options.firstRestricted;
                 this.throwUnexpectedToken(token, options.message);
             }
             return {
@@ -3276,19 +3185,19 @@ return /******/ (function(modules) { // webpackBootstrap
                 firstRestricted: options.firstRestricted,
                 message: options.message
             };
-        };
-        Parser.prototype.parseAssignmentExpression = function () {
-            var expr;
+        }
+        parseAssignmentExpression() {
+            let expr;
             if (!this.context.allowYield && this.matchKeyword('yield')) {
                 expr = this.parseYieldExpression();
             }
             else {
-                var startToken = this.lookahead;
-                var token = startToken;
+                const startToken = this.lookahead;
+                let token = startToken;
                 expr = this.parseConditionalExpression();
                 if (token.type === 3 /* Identifier */ && (token.lineNumber === this.lookahead.lineNumber) && token.value === 'async') {
                     if (this.lookahead.type === 3 /* Identifier */ || this.matchKeyword('yield')) {
-                        var arg = this.parsePrimaryExpression();
+                        const arg = this.parsePrimaryExpression();
                         this.reinterpretExpressionAsPattern(arg);
                         expr = {
                             type: ArrowParameterPlaceHolder,
@@ -3301,25 +3210,25 @@ return /******/ (function(modules) { // webpackBootstrap
                     // https://tc39.github.io/ecma262/#sec-arrow-function-definitions
                     this.context.isAssignmentTarget = false;
                     this.context.isBindingElement = false;
-                    var isAsync = expr.async;
-                    var list = this.reinterpretAsCoverFormalsList(expr);
+                    const isAsync = expr.async;
+                    const list = this.reinterpretAsCoverFormalsList(expr);
                     if (list) {
                         if (this.hasLineTerminator) {
                             this.tolerateUnexpectedToken(this.lookahead);
                         }
                         this.context.firstCoverInitializedNameError = null;
-                        var previousStrict = this.context.strict;
-                        var previousAllowStrictDirective = this.context.allowStrictDirective;
+                        const previousStrict = this.context.strict;
+                        const previousAllowStrictDirective = this.context.allowStrictDirective;
                         this.context.allowStrictDirective = list.simple;
-                        var previousAllowYield = this.context.allowYield;
-                        var previousAwait = this.context.await;
+                        const previousAllowYield = this.context.allowYield;
+                        const previousAwait = this.context.await;
                         this.context.allowYield = true;
                         this.context.await = isAsync;
-                        var node = this.startNode(startToken);
+                        const node = this.startNode(startToken);
                         this.expect('=>');
-                        var body = void 0;
+                        let body;
                         if (this.match('{')) {
-                            var previousAllowIn = this.context.allowIn;
+                            const previousAllowIn = this.context.allowIn;
                             this.context.allowIn = true;
                             body = this.parseFunctionSourceElements();
                             this.context.allowIn = previousAllowIn;
@@ -3327,7 +3236,7 @@ return /******/ (function(modules) { // webpackBootstrap
                         else {
                             body = this.isolateCoverGrammar(this.parseAssignmentExpression);
                         }
-                        var expression = body.type !== syntax_1.Syntax.BlockStatement;
+                        const expression = body.type !== syntax_1.Syntax.BlockStatement;
                         if (this.context.strict && list.firstRestricted) {
                             this.throwUnexpectedToken(list.firstRestricted, list.message);
                         }
@@ -3348,7 +3257,7 @@ return /******/ (function(modules) { // webpackBootstrap
                             this.tolerateError(messages_1.Messages.InvalidLHSInAssignment);
                         }
                         if (this.context.strict && expr.type === syntax_1.Syntax.Identifier) {
-                            var id = expr;
+                            const id = expr;
                             if (this.scanner.isRestrictedWord(id.name)) {
                                 this.tolerateUnexpectedToken(token, messages_1.Messages.StrictLHSAssignment);
                             }
@@ -3364,21 +3273,21 @@ return /******/ (function(modules) { // webpackBootstrap
                             this.reinterpretExpressionAsPattern(expr);
                         }
                         token = this.nextToken();
-                        var operator = token.value;
-                        var right = this.isolateCoverGrammar(this.parseAssignmentExpression);
+                        const operator = token.value;
+                        const right = this.isolateCoverGrammar(this.parseAssignmentExpression);
                         expr = this.finalize(this.startNode(startToken), new Node.AssignmentExpression(operator, expr, right));
                         this.context.firstCoverInitializedNameError = null;
                     }
                 }
             }
             return expr;
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-comma-operator
-        Parser.prototype.parseExpression = function () {
-            var startToken = this.lookahead;
-            var expr = this.isolateCoverGrammar(this.parseAssignmentExpression);
+        parseExpression() {
+            const startToken = this.lookahead;
+            let expr = this.isolateCoverGrammar(this.parseAssignmentExpression);
             if (this.match(',')) {
-                var expressions = [];
+                const expressions = [];
                 expressions.push(expr);
                 while (this.lookahead.type !== 2 /* EOF */) {
                     if (!this.match(',')) {
@@ -3390,10 +3299,10 @@ return /******/ (function(modules) { // webpackBootstrap
                 expr = this.finalize(this.startNode(startToken), new Node.SequenceExpression(expressions));
             }
             return expr;
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-block
-        Parser.prototype.parseStatementListItem = function () {
-            var statement;
+        parseStatementListItem() {
+            let statement;
             this.context.isAssignmentTarget = true;
             this.context.isBindingElement = true;
             if (this.lookahead.type === 4 /* Keyword */) {
@@ -3436,11 +3345,11 @@ return /******/ (function(modules) { // webpackBootstrap
                 statement = this.parseStatement();
             }
             return statement;
-        };
-        Parser.prototype.parseBlock = function () {
-            var node = this.createNode();
+        }
+        parseBlock() {
+            const node = this.createNode();
             this.expect('{');
-            var block = [];
+            const block = [];
             while (true) {
                 if (this.match('}')) {
                     break;
@@ -3449,18 +3358,18 @@ return /******/ (function(modules) { // webpackBootstrap
             }
             this.expect('}');
             return this.finalize(node, new Node.BlockStatement(block));
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-let-and-const-declarations
-        Parser.prototype.parseLexicalBinding = function (kind, options) {
-            var node = this.createNode();
-            var params = [];
-            var id = this.parsePattern(params, kind);
+        parseLexicalBinding(kind, options) {
+            const node = this.createNode();
+            const params = [];
+            const id = this.parsePattern(params, kind);
             if (this.context.strict && id.type === syntax_1.Syntax.Identifier) {
                 if (this.scanner.isRestrictedWord(id.name)) {
                     this.tolerateError(messages_1.Messages.StrictVarName);
                 }
             }
-            var init = null;
+            let init = null;
             if (kind === 'const') {
                 if (!this.matchKeyword('in') && !this.matchContextualKeyword('of')) {
                     if (this.match('=')) {
@@ -3477,45 +3386,45 @@ return /******/ (function(modules) { // webpackBootstrap
                 init = this.isolateCoverGrammar(this.parseAssignmentExpression);
             }
             return this.finalize(node, new Node.VariableDeclarator(id, init));
-        };
-        Parser.prototype.parseBindingList = function (kind, options) {
-            var list = [this.parseLexicalBinding(kind, options)];
+        }
+        parseBindingList(kind, options) {
+            const list = [this.parseLexicalBinding(kind, options)];
             while (this.match(',')) {
                 this.nextToken();
                 list.push(this.parseLexicalBinding(kind, options));
             }
             return list;
-        };
-        Parser.prototype.isLexicalDeclaration = function () {
-            var state = this.scanner.saveState();
+        }
+        isLexicalDeclaration() {
+            const state = this.scanner.saveState();
             this.scanner.scanComments();
-            var next = this.scanner.lex();
+            const next = this.scanner.lex();
             this.scanner.restoreState(state);
             return (next.type === 3 /* Identifier */) ||
                 (next.type === 7 /* Punctuator */ && next.value === '[') ||
                 (next.type === 7 /* Punctuator */ && next.value === '{') ||
                 (next.type === 4 /* Keyword */ && next.value === 'let') ||
                 (next.type === 4 /* Keyword */ && next.value === 'yield');
-        };
-        Parser.prototype.parseLexicalDeclaration = function (options) {
-            var node = this.createNode();
-            var kind = this.nextToken().value;
+        }
+        parseLexicalDeclaration(options) {
+            const node = this.createNode();
+            const kind = this.nextToken().value;
             assert_1.assert(kind === 'let' || kind === 'const', 'Lexical declaration must be either let or const');
-            var declarations = this.parseBindingList(kind, options);
+            const declarations = this.parseBindingList(kind, options);
             this.consumeSemicolon();
             return this.finalize(node, new Node.VariableDeclaration(declarations, kind));
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-destructuring-binding-patterns
-        Parser.prototype.parseBindingRestElement = function (params, kind) {
-            var node = this.createNode();
+        parseBindingRestElement(params, kind) {
+            const node = this.createNode();
             this.expect('...');
-            var arg = this.parsePattern(params, kind);
+            const arg = this.parsePattern(params, kind);
             return this.finalize(node, new Node.RestElement(arg));
-        };
-        Parser.prototype.parseArrayPattern = function (params, kind) {
-            var node = this.createNode();
+        }
+        parseArrayPattern(params, kind) {
+            const node = this.createNode();
             this.expect('[');
-            var elements = [];
+            const elements = [];
             while (!this.match(']')) {
                 if (this.match(',')) {
                     this.nextToken();
@@ -3536,23 +3445,23 @@ return /******/ (function(modules) { // webpackBootstrap
             }
             this.expect(']');
             return this.finalize(node, new Node.ArrayPattern(elements));
-        };
-        Parser.prototype.parsePropertyPattern = function (params, kind) {
-            var node = this.createNode();
-            var computed = false;
-            var shorthand = false;
-            var method = false;
-            var key;
-            var value;
+        }
+        parsePropertyPattern(params, kind) {
+            const node = this.createNode();
+            let computed = false;
+            let shorthand = false;
+            const method = false;
+            let key;
+            let value;
             if (this.lookahead.type === 3 /* Identifier */) {
-                var keyToken = this.lookahead;
+                const keyToken = this.lookahead;
                 key = this.parseVariableIdentifier();
-                var init = this.finalize(node, new Node.Identifier(keyToken.value));
+                const init = this.finalize(node, new Node.Identifier(keyToken.value));
                 if (this.match('=')) {
                     params.push(keyToken);
                     shorthand = true;
                     this.nextToken();
-                    var expr = this.parseAssignmentExpression();
+                    const expr = this.parseAssignmentExpression();
                     value = this.finalize(this.startNode(keyToken), new Node.AssignmentPattern(init, expr));
                 }
                 else if (!this.match(':')) {
@@ -3572,11 +3481,11 @@ return /******/ (function(modules) { // webpackBootstrap
                 value = this.parsePatternWithDefault(params, kind);
             }
             return this.finalize(node, new Node.Property('init', key, computed, value, method, shorthand));
-        };
-        Parser.prototype.parseRestProperty = function (params, kind) {
-            var node = this.createNode();
+        }
+        parseRestProperty(params, kind) {
+            const node = this.createNode();
             this.expect('...');
-            var arg = this.parsePattern(params);
+            const arg = this.parsePattern(params);
             if (this.match('=')) {
                 this.throwError(messages_1.Messages.DefaultRestProperty);
             }
@@ -3584,10 +3493,10 @@ return /******/ (function(modules) { // webpackBootstrap
                 this.throwError(messages_1.Messages.PropertyAfterRestProperty);
             }
             return this.finalize(node, new Node.RestElement(arg));
-        };
-        Parser.prototype.parseObjectPattern = function (params, kind) {
-            var node = this.createNode();
-            var properties = [];
+        }
+        parseObjectPattern(params, kind) {
+            const node = this.createNode();
+            const properties = [];
             this.expect('{');
             while (!this.match('}')) {
                 properties.push(this.match('...') ? this.parseRestProperty(params, kind) : this.parsePropertyPattern(params, kind));
@@ -3597,9 +3506,9 @@ return /******/ (function(modules) { // webpackBootstrap
             }
             this.expect('}');
             return this.finalize(node, new Node.ObjectPattern(properties));
-        };
-        Parser.prototype.parsePattern = function (params, kind) {
-            var pattern;
+        }
+        parsePattern(params, kind) {
+            let pattern;
             if (this.match('[')) {
                 pattern = this.parseArrayPattern(params, kind);
             }
@@ -3614,24 +3523,24 @@ return /******/ (function(modules) { // webpackBootstrap
                 pattern = this.parseVariableIdentifier(kind);
             }
             return pattern;
-        };
-        Parser.prototype.parsePatternWithDefault = function (params, kind) {
-            var startToken = this.lookahead;
-            var pattern = this.parsePattern(params, kind);
+        }
+        parsePatternWithDefault(params, kind) {
+            const startToken = this.lookahead;
+            let pattern = this.parsePattern(params, kind);
             if (this.match('=')) {
                 this.nextToken();
-                var previousAllowYield = this.context.allowYield;
+                const previousAllowYield = this.context.allowYield;
                 this.context.allowYield = true;
-                var right = this.isolateCoverGrammar(this.parseAssignmentExpression);
+                const right = this.isolateCoverGrammar(this.parseAssignmentExpression);
                 this.context.allowYield = previousAllowYield;
                 pattern = this.finalize(this.startNode(startToken), new Node.AssignmentPattern(pattern, right));
             }
             return pattern;
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-variable-statement
-        Parser.prototype.parseVariableIdentifier = function (kind) {
-            var node = this.createNode();
-            var token = this.nextToken();
+        parseVariableIdentifier(kind) {
+            const node = this.createNode();
+            const token = this.nextToken();
             if (token.type === 4 /* Keyword */ && token.value === 'yield') {
                 if (this.context.strict) {
                     this.tolerateUnexpectedToken(token, messages_1.Messages.StrictReservedWord);
@@ -3654,17 +3563,17 @@ return /******/ (function(modules) { // webpackBootstrap
                 this.tolerateUnexpectedToken(token);
             }
             return this.finalize(node, new Node.Identifier(token.value));
-        };
-        Parser.prototype.parseVariableDeclaration = function (options) {
-            var node = this.createNode();
-            var params = [];
-            var id = this.parsePattern(params, 'var');
+        }
+        parseVariableDeclaration(options) {
+            const node = this.createNode();
+            const params = [];
+            const id = this.parsePattern(params, 'var');
             if (this.context.strict && id.type === syntax_1.Syntax.Identifier) {
                 if (this.scanner.isRestrictedWord(id.name)) {
                     this.tolerateError(messages_1.Messages.StrictVarName);
                 }
             }
-            var init = null;
+            let init = null;
             if (this.match('=')) {
                 this.nextToken();
                 init = this.isolateCoverGrammar(this.parseAssignmentExpression);
@@ -3673,51 +3582,51 @@ return /******/ (function(modules) { // webpackBootstrap
                 this.expect('=');
             }
             return this.finalize(node, new Node.VariableDeclarator(id, init));
-        };
-        Parser.prototype.parseVariableDeclarationList = function (options) {
-            var opt = { inFor: options.inFor };
-            var list = [];
+        }
+        parseVariableDeclarationList(options) {
+            const opt = { inFor: options.inFor };
+            const list = [];
             list.push(this.parseVariableDeclaration(opt));
             while (this.match(',')) {
                 this.nextToken();
                 list.push(this.parseVariableDeclaration(opt));
             }
             return list;
-        };
-        Parser.prototype.parseVariableStatement = function () {
-            var node = this.createNode();
+        }
+        parseVariableStatement() {
+            const node = this.createNode();
             this.expectKeyword('var');
-            var declarations = this.parseVariableDeclarationList({ inFor: false });
+            const declarations = this.parseVariableDeclarationList({ inFor: false });
             this.consumeSemicolon();
             return this.finalize(node, new Node.VariableDeclaration(declarations, 'var'));
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-empty-statement
-        Parser.prototype.parseEmptyStatement = function () {
-            var node = this.createNode();
+        parseEmptyStatement() {
+            const node = this.createNode();
             this.expect(';');
             return this.finalize(node, new Node.EmptyStatement());
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-expression-statement
-        Parser.prototype.parseExpressionStatement = function () {
-            var node = this.createNode();
-            var expr = this.parseExpression();
+        parseExpressionStatement() {
+            const node = this.createNode();
+            const expr = this.parseExpression();
             this.consumeSemicolon();
             return this.finalize(node, new Node.ExpressionStatement(expr));
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-if-statement
-        Parser.prototype.parseIfClause = function () {
+        parseIfClause() {
             if (this.context.strict && this.matchKeyword('function')) {
                 this.tolerateError(messages_1.Messages.StrictFunction);
             }
             return this.parseStatement();
-        };
-        Parser.prototype.parseIfStatement = function () {
-            var node = this.createNode();
-            var consequent;
-            var alternate = null;
+        }
+        parseIfStatement() {
+            const node = this.createNode();
+            let consequent;
+            let alternate = null;
             this.expectKeyword('if');
             this.expect('(');
-            var test = this.parseExpression();
+            const test = this.parseExpression();
             if (!this.match(')') && this.config.tolerant) {
                 this.tolerateUnexpectedToken(this.nextToken());
                 consequent = this.finalize(this.createNode(), new Node.EmptyStatement());
@@ -3731,18 +3640,18 @@ return /******/ (function(modules) { // webpackBootstrap
                 }
             }
             return this.finalize(node, new Node.IfStatement(test, consequent, alternate));
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-do-while-statement
-        Parser.prototype.parseDoWhileStatement = function () {
-            var node = this.createNode();
+        parseDoWhileStatement() {
+            const node = this.createNode();
             this.expectKeyword('do');
-            var previousInIteration = this.context.inIteration;
+            const previousInIteration = this.context.inIteration;
             this.context.inIteration = true;
-            var body = this.parseStatement();
+            const body = this.parseStatement();
             this.context.inIteration = previousInIteration;
             this.expectKeyword('while');
             this.expect('(');
-            var test = this.parseExpression();
+            const test = this.parseExpression();
             if (!this.match(')') && this.config.tolerant) {
                 this.tolerateUnexpectedToken(this.nextToken());
             }
@@ -3753,51 +3662,65 @@ return /******/ (function(modules) { // webpackBootstrap
                 }
             }
             return this.finalize(node, new Node.DoWhileStatement(body, test));
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-while-statement
-        Parser.prototype.parseWhileStatement = function () {
-            var node = this.createNode();
-            var body;
+        parseWhileStatement() {
+            const node = this.createNode();
+            let body;
             this.expectKeyword('while');
             this.expect('(');
-            var test = this.parseExpression();
+            const test = this.parseExpression();
             if (!this.match(')') && this.config.tolerant) {
                 this.tolerateUnexpectedToken(this.nextToken());
                 body = this.finalize(this.createNode(), new Node.EmptyStatement());
             }
             else {
                 this.expect(')');
-                var previousInIteration = this.context.inIteration;
+                const previousInIteration = this.context.inIteration;
                 this.context.inIteration = true;
                 body = this.parseStatement();
                 this.context.inIteration = previousInIteration;
             }
             return this.finalize(node, new Node.WhileStatement(test, body));
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-for-statement
         // https://tc39.github.io/ecma262/#sec-for-in-and-for-of-statements
-        Parser.prototype.parseForStatement = function () {
-            var init = null;
-            var test = null;
-            var update = null;
-            var forIn = true;
-            var left, right;
-            var node = this.createNode();
+        parseForStatement() {
+            let init = null;
+            let test = null;
+            let update = null;
+            let forIn = true;
+            let isForAwaitOf = false;
+            let left, right;
+            const node = this.createNode();
             this.expectKeyword('for');
+            if (this.matchContextualKeyword('await')) {
+                if (!this.context.await) {
+                    this.throwUnexpectedToken(this.lookahead, messages_1.Messages.ForAwaitInNonAsync);
+                }
+                this.nextToken();
+                isForAwaitOf = true;
+            }
             this.expect('(');
             if (this.match(';')) {
+                if (isForAwaitOf) {
+                    this.throwUnexpectedToken(this.lookahead, messages_1.Messages.ForAwaitOfSemicolon);
+                }
                 this.nextToken();
             }
             else {
                 if (this.matchKeyword('var')) {
                     init = this.createNode();
                     this.nextToken();
-                    var previousAllowIn = this.context.allowIn;
+                    const previousAllowIn = this.context.allowIn;
                     this.context.allowIn = false;
-                    var declarations = this.parseVariableDeclarationList({ inFor: true });
+                    const declarations = this.parseVariableDeclarationList({ inFor: true });
                     this.context.allowIn = previousAllowIn;
                     if (declarations.length === 1 && this.matchKeyword('in')) {
-                        var decl = declarations[0];
+                        if (isForAwaitOf) {
+                            this.throwUnexpectedToken(this.lookahead, messages_1.Messages.ForAwaitOfSawIn);
+                        }
+                        const decl = declarations[0];
                         if (decl.init && (decl.id.type === syntax_1.Syntax.ArrayPattern || decl.id.type === syntax_1.Syntax.ObjectPattern || this.context.strict)) {
                             this.tolerateError(messages_1.Messages.ForInOfLoopInitializer, 'for-in');
                         }
@@ -3822,7 +3745,7 @@ return /******/ (function(modules) { // webpackBootstrap
                 }
                 else if (this.matchKeyword('const') || this.matchKeyword('let')) {
                     init = this.createNode();
-                    var kind = this.nextToken().value;
+                    const kind = this.nextToken().value;
                     if (!this.context.strict && this.lookahead.value === 'in') {
                         init = this.finalize(init, new Node.Identifier(kind));
                         this.nextToken();
@@ -3831,11 +3754,14 @@ return /******/ (function(modules) { // webpackBootstrap
                         init = null;
                     }
                     else {
-                        var previousAllowIn = this.context.allowIn;
+                        const previousAllowIn = this.context.allowIn;
                         this.context.allowIn = false;
-                        var declarations = this.parseBindingList(kind, { inFor: true });
+                        const declarations = this.parseBindingList(kind, { inFor: true });
                         this.context.allowIn = previousAllowIn;
                         if (declarations.length === 1 && declarations[0].init === null && this.matchKeyword('in')) {
+                            if (isForAwaitOf) {
+                                this.throwUnexpectedToken(this.lookahead, messages_1.Messages.ForAwaitOfSawIn);
+                            }
                             init = this.finalize(init, new Node.VariableDeclaration(declarations, kind));
                             this.nextToken();
                             left = init;
@@ -3857,8 +3783,8 @@ return /******/ (function(modules) { // webpackBootstrap
                     }
                 }
                 else {
-                    var initStartToken = this.lookahead;
-                    var previousAllowIn = this.context.allowIn;
+                    const initStartToken = this.lookahead;
+                    const previousAllowIn = this.context.allowIn;
                     this.context.allowIn = false;
                     init = this.inheritCoverGrammar(this.parseAssignmentExpression);
                     this.context.allowIn = previousAllowIn;
@@ -3866,6 +3792,9 @@ return /******/ (function(modules) { // webpackBootstrap
                         if (!this.context.isAssignmentTarget || init.type === syntax_1.Syntax.AssignmentExpression) {
                             this.tolerateError(messages_1.Messages.InvalidLHSInForIn);
                         }
+                        if (isForAwaitOf) {
+                            this.throwUnexpectedToken(this.lookahead, messages_1.Messages.ForAwaitOfSawIn);
+                        }
                         this.nextToken();
                         this.reinterpretExpressionAsPattern(init);
                         left = init;
@@ -3885,7 +3814,7 @@ return /******/ (function(modules) { // webpackBootstrap
                     }
                     else {
                         if (this.match(',')) {
-                            var initSeq = [init];
+                            const initSeq = [init];
                             while (this.match(',')) {
                                 this.nextToken();
                                 initSeq.push(this.isolateCoverGrammar(this.parseAssignmentExpression));
@@ -3905,14 +3834,14 @@ return /******/ (function(modules) { // webpackBootstrap
                     update = this.parseExpression();
                 }
             }
-            var body;
+            let body;
             if (!this.match(')') && this.config.tolerant) {
                 this.tolerateUnexpectedToken(this.nextToken());
                 body = this.finalize(this.createNode(), new Node.EmptyStatement());
             }
             else {
                 this.expect(')');
-                var previousInIteration = this.context.inIteration;
+                const previousInIteration = this.context.inIteration;
                 this.context.inIteration = true;
                 body = this.isolateCoverGrammar(this.parseStatement);
                 this.context.inIteration = previousInIteration;
@@ -3920,17 +3849,17 @@ return /******/ (function(modules) { // webpackBootstrap
             return (typeof left === 'undefined') ?
                 this.finalize(node, new Node.ForStatement(init, test, update, body)) :
                 forIn ? this.finalize(node, new Node.ForInStatement(left, right, body)) :
-                    this.finalize(node, new Node.ForOfStatement(left, right, body));
-        };
+                    this.finalize(node, new Node.ForOfStatement(left, right, body, isForAwaitOf));
+        }
         // https://tc39.github.io/ecma262/#sec-continue-statement
-        Parser.prototype.parseContinueStatement = function () {
-            var node = this.createNode();
+        parseContinueStatement() {
+            const node = this.createNode();
             this.expectKeyword('continue');
-            var label = null;
+            let label = null;
             if (this.lookahead.type === 3 /* Identifier */ && !this.hasLineTerminator) {
-                var id = this.parseVariableIdentifier();
+                const id = this.parseVariableIdentifier();
                 label = id;
-                var key = '$' + id.name;
+                const key = '$' + id.name;
                 if (!Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) {
                     this.throwError(messages_1.Messages.UnknownLabel, id.name);
                 }
@@ -3940,15 +3869,15 @@ return /******/ (function(modules) { // webpackBootstrap
                 this.throwError(messages_1.Messages.IllegalContinue);
             }
             return this.finalize(node, new Node.ContinueStatement(label));
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-break-statement
-        Parser.prototype.parseBreakStatement = function () {
-            var node = this.createNode();
+        parseBreakStatement() {
+            const node = this.createNode();
             this.expectKeyword('break');
-            var label = null;
+            let label = null;
             if (this.lookahead.type === 3 /* Identifier */ && !this.hasLineTerminator) {
-                var id = this.parseVariableIdentifier();
-                var key = '$' + id.name;
+                const id = this.parseVariableIdentifier();
+                const key = '$' + id.name;
                 if (!Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) {
                     this.throwError(messages_1.Messages.UnknownLabel, id.name);
                 }
@@ -3959,32 +3888,32 @@ return /******/ (function(modules) { // webpackBootstrap
                 this.throwError(messages_1.Messages.IllegalBreak);
             }
             return this.finalize(node, new Node.BreakStatement(label));
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-return-statement
-        Parser.prototype.parseReturnStatement = function () {
+        parseReturnStatement() {
             if (!this.context.inFunctionBody) {
                 this.tolerateError(messages_1.Messages.IllegalReturn);
             }
-            var node = this.createNode();
+            const node = this.createNode();
             this.expectKeyword('return');
-            var hasArgument = (!this.match(';') && !this.match('}') &&
+            const hasArgument = (!this.match(';') && !this.match('}') &&
                 !this.hasLineTerminator && this.lookahead.type !== 2 /* EOF */) ||
                 this.lookahead.type === 8 /* StringLiteral */ ||
                 this.lookahead.type === 10 /* Template */;
-            var argument = hasArgument ? this.parseExpression() : null;
+            const argument = hasArgument ? this.parseExpression() : null;
             this.consumeSemicolon();
             return this.finalize(node, new Node.ReturnStatement(argument));
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-with-statement
-        Parser.prototype.parseWithStatement = function () {
+        parseWithStatement() {
             if (this.context.strict) {
                 this.tolerateError(messages_1.Messages.StrictModeWith);
             }
-            var node = this.createNode();
-            var body;
+            const node = this.createNode();
+            let body;
             this.expectKeyword('with');
             this.expect('(');
-            var object = this.parseExpression();
+            const object = this.parseExpression();
             if (!this.match(')') && this.config.tolerant) {
                 this.tolerateUnexpectedToken(this.nextToken());
                 body = this.finalize(this.createNode(), new Node.EmptyStatement());
@@ -3994,11 +3923,11 @@ return /******/ (function(modules) { // webpackBootstrap
                 body = this.parseStatement();
             }
             return this.finalize(node, new Node.WithStatement(object, body));
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-switch-statement
-        Parser.prototype.parseSwitchCase = function () {
-            var node = this.createNode();
-            var test;
+        parseSwitchCase() {
+            const node = this.createNode();
+            let test;
             if (this.matchKeyword('default')) {
                 this.nextToken();
                 test = null;
@@ -4008,7 +3937,7 @@ return /******/ (function(modules) { // webpackBootstrap
                 test = this.parseExpression();
             }
             this.expect(':');
-            var consequent = [];
+            const consequent = [];
             while (true) {
                 if (this.match('}') || this.matchKeyword('default') || this.matchKeyword('case')) {
                     break;
@@ -4016,23 +3945,23 @@ return /******/ (function(modules) { // webpackBootstrap
                 consequent.push(this.parseStatementListItem());
             }
             return this.finalize(node, new Node.SwitchCase(test, consequent));
-        };
-        Parser.prototype.parseSwitchStatement = function () {
-            var node = this.createNode();
+        }
+        parseSwitchStatement() {
+            const node = this.createNode();
             this.expectKeyword('switch');
             this.expect('(');
-            var discriminant = this.parseExpression();
+            const discriminant = this.parseExpression();
             this.expect(')');
-            var previousInSwitch = this.context.inSwitch;
+            const previousInSwitch = this.context.inSwitch;
             this.context.inSwitch = true;
-            var cases = [];
-            var defaultFound = false;
+            const cases = [];
+            let defaultFound = false;
             this.expect('{');
             while (true) {
                 if (this.match('}')) {
                     break;
                 }
-                var clause = this.parseSwitchCase();
+                const clause = this.parseSwitchCase();
                 if (clause.test === null) {
                     if (defaultFound) {
                         this.throwError(messages_1.Messages.MultipleDefaultsInSwitch);
@@ -4044,28 +3973,28 @@ return /******/ (function(modules) { // webpackBootstrap
             this.expect('}');
             this.context.inSwitch = previousInSwitch;
             return this.finalize(node, new Node.SwitchStatement(discriminant, cases));
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-labelled-statements
-        Parser.prototype.parseLabelledStatement = function () {
-            var node = this.createNode();
-            var expr = this.parseExpression();
-            var statement;
+        parseLabelledStatement() {
+            const node = this.createNode();
+            const expr = this.parseExpression();
+            let statement;
             if ((expr.type === syntax_1.Syntax.Identifier) && this.match(':')) {
                 this.nextToken();
-                var id = expr;
-                var key = '$' + id.name;
+                const id = expr;
+                const key = '$' + id.name;
                 if (Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) {
                     this.throwError(messages_1.Messages.Redeclaration, 'Label', id.name);
                 }
                 this.context.labelSet[key] = true;
-                var body = void 0;
+                let body;
                 if (this.matchKeyword('class')) {
                     this.tolerateUnexpectedToken(this.lookahead);
                     body = this.parseClassDeclaration();
                 }
                 else if (this.matchKeyword('function')) {
-                    var token = this.lookahead;
-                    var declaration = this.parseFunctionDeclaration();
+                    const token = this.lookahead;
+                    const declaration = this.parseFunctionDeclaration();
                     if (this.context.strict) {
                         this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunction);
                     }
@@ -4085,31 +4014,36 @@ return /******/ (function(modules) { // webpackBootstrap
                 statement = new Node.ExpressionStatement(expr);
             }
             return this.finalize(node, statement);
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-throw-statement
-        Parser.prototype.parseThrowStatement = function () {
-            var node = this.createNode();
+        parseThrowStatement() {
+            const node = this.createNode();
             this.expectKeyword('throw');
             if (this.hasLineTerminator) {
                 this.throwError(messages_1.Messages.NewlineAfterThrow);
             }
-            var argument = this.parseExpression();
+            const argument = this.parseExpression();
             this.consumeSemicolon();
             return this.finalize(node, new Node.ThrowStatement(argument));
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-try-statement
-        Parser.prototype.parseCatchClause = function () {
-            var node = this.createNode();
+        parseCatchClause() {
+            const node = this.createNode();
+            let body;
             this.expectKeyword('catch');
+            if (!this.match('(')) {
+                body = this.parseBlock();
+                return this.finalize(node, new Node.CatchClause(null, body));
+            }
             this.expect('(');
             if (this.match(')')) {
                 this.throwUnexpectedToken(this.lookahead);
             }
-            var params = [];
-            var param = this.parsePattern(params);
-            var paramMap = {};
-            for (var i = 0; i < params.length; i++) {
-                var key = '$' + params[i].value;
+            const params = [];
+            const param = this.parsePattern(params);
+            const paramMap = {};
+            for (let i = 0; i < params.length; i++) {
+                const key = '$' + params[i].value;
                 if (Object.prototype.hasOwnProperty.call(paramMap, key)) {
                     this.tolerateError(messages_1.Messages.DuplicateBinding, params[i].value);
                 }
@@ -4121,34 +4055,34 @@ return /******/ (function(modules) { // webpackBootstrap
                 }
             }
             this.expect(')');
-            var body = this.parseBlock();
+            body = this.parseBlock();
             return this.finalize(node, new Node.CatchClause(param, body));
-        };
-        Parser.prototype.parseFinallyClause = function () {
+        }
+        parseFinallyClause() {
             this.expectKeyword('finally');
             return this.parseBlock();
-        };
-        Parser.prototype.parseTryStatement = function () {
-            var node = this.createNode();
+        }
+        parseTryStatement() {
+            const node = this.createNode();
             this.expectKeyword('try');
-            var block = this.parseBlock();
-            var handler = this.matchKeyword('catch') ? this.parseCatchClause() : null;
-            var finalizer = this.matchKeyword('finally') ? this.parseFinallyClause() : null;
+            const block = this.parseBlock();
+            const handler = this.matchKeyword('catch') ? this.parseCatchClause() : null;
+            const finalizer = this.matchKeyword('finally') ? this.parseFinallyClause() : null;
             if (!handler && !finalizer) {
                 this.throwError(messages_1.Messages.NoCatchOrFinally);
             }
             return this.finalize(node, new Node.TryStatement(block, handler, finalizer));
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-debugger-statement
-        Parser.prototype.parseDebuggerStatement = function () {
-            var node = this.createNode();
+        parseDebuggerStatement() {
+            const node = this.createNode();
             this.expectKeyword('debugger');
             this.consumeSemicolon();
             return this.finalize(node, new Node.DebuggerStatement());
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-ecmascript-language-statements-and-declarations
-        Parser.prototype.parseStatement = function () {
-            var statement;
+        parseStatement() {
+            let statement;
             switch (this.lookahead.type) {
                 case 1 /* BooleanLiteral */:
                 case 5 /* NullLiteral */:
@@ -4159,7 +4093,7 @@ return /******/ (function(modules) { // webpackBootstrap
                     statement = this.parseExpressionStatement();
                     break;
                 case 7 /* Punctuator */:
-                    var value = this.lookahead.value;
+                    const value = this.lookahead.value;
                     if (value === '{') {
                         statement = this.parseBlock();
                     }
@@ -4229,16 +4163,16 @@ return /******/ (function(modules) { // webpackBootstrap
                     statement = this.throwUnexpectedToken(this.lookahead);
             }
             return statement;
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-function-definitions
-        Parser.prototype.parseFunctionSourceElements = function () {
-            var node = this.createNode();
+        parseFunctionSourceElements() {
+            const node = this.createNode();
             this.expect('{');
-            var body = this.parseDirectivePrologues();
-            var previousLabelSet = this.context.labelSet;
-            var previousInIteration = this.context.inIteration;
-            var previousInSwitch = this.context.inSwitch;
-            var previousInFunctionBody = this.context.inFunctionBody;
+            const body = this.parseDirectivePrologues();
+            const previousLabelSet = this.context.labelSet;
+            const previousInIteration = this.context.inIteration;
+            const previousInSwitch = this.context.inSwitch;
+            const previousInFunctionBody = this.context.inFunctionBody;
             this.context.labelSet = {};
             this.context.inIteration = false;
             this.context.inSwitch = false;
@@ -4255,9 +4189,9 @@ return /******/ (function(modules) { // webpackBootstrap
             this.context.inSwitch = previousInSwitch;
             this.context.inFunctionBody = previousInFunctionBody;
             return this.finalize(node, new Node.BlockStatement(body));
-        };
-        Parser.prototype.validateParam = function (options, param, name) {
-            var key = '$' + name;
+        }
+        validateParam(options, param, name) {
+            const key = '$' + name;
             if (this.context.strict) {
                 if (this.scanner.isRestrictedWord(name)) {
                     options.stricted = param;
@@ -4289,11 +4223,11 @@ return /******/ (function(modules) { // webpackBootstrap
             else {
                 options.paramSet[key] = true;
             }
-        };
-        Parser.prototype.parseRestElement = function (params) {
-            var node = this.createNode();
+        }
+        parseRestElement(params) {
+            const node = this.createNode();
             this.expect('...');
-            var arg = this.parsePattern(params);
+            const arg = this.parsePattern(params);
             if (this.match('=')) {
                 this.throwError(messages_1.Messages.DefaultRestParameter);
             }
@@ -4301,18 +4235,18 @@ return /******/ (function(modules) { // webpackBootstrap
                 this.throwError(messages_1.Messages.ParameterAfterRestParameter);
             }
             return this.finalize(node, new Node.RestElement(arg));
-        };
-        Parser.prototype.parseFormalParameter = function (options) {
-            var params = [];
-            var param = this.match('...') ? this.parseRestElement(params) : this.parsePatternWithDefault(params);
-            for (var i = 0; i < params.length; i++) {
+        }
+        parseFormalParameter(options) {
+            const params = [];
+            const param = this.match('...') ? this.parseRestElement(params) : this.parsePatternWithDefault(params);
+            for (let i = 0; i < params.length; i++) {
                 this.validateParam(options, params[i], params[i].value);
             }
             options.simple = options.simple && (param instanceof Node.Identifier);
             options.params.push(param);
-        };
-        Parser.prototype.parseFormalParameters = function (firstRestricted) {
-            var options;
+        }
+        parseFormalParameters(firstRestricted) {
+            let options;
             options = {
                 simple: true,
                 params: [],
@@ -4340,34 +4274,34 @@ return /******/ (function(modules) { // webpackBootstrap
                 firstRestricted: options.firstRestricted,
                 message: options.message
             };
-        };
-        Parser.prototype.matchAsyncFunction = function () {
-            var match = this.matchContextualKeyword('async');
+        }
+        matchAsyncFunction() {
+            let match = this.matchContextualKeyword('async');
             if (match) {
-                var state = this.scanner.saveState();
+                const state = this.scanner.saveState();
                 this.scanner.scanComments();
-                var next = this.scanner.lex();
+                const next = this.scanner.lex();
                 this.scanner.restoreState(state);
                 match = (state.lineNumber === next.lineNumber) && (next.type === 4 /* Keyword */) && (next.value === 'function');
             }
             return match;
-        };
-        Parser.prototype.parseFunctionDeclaration = function (identifierIsOptional) {
-            var node = this.createNode();
-            var isAsync = this.matchContextualKeyword('async');
+        }
+        parseFunctionDeclaration(identifierIsOptional) {
+            const node = this.createNode();
+            const isAsync = this.matchContextualKeyword('async');
             if (isAsync) {
                 this.nextToken();
             }
             this.expectKeyword('function');
-            var isGenerator = isAsync ? false : this.match('*');
+            const isGenerator = this.match('*');
             if (isGenerator) {
                 this.nextToken();
             }
-            var message;
-            var id = null;
-            var firstRestricted = null;
+            let message;
+            let id = null;
+            let firstRestricted = null;
             if (!identifierIsOptional || !this.match('(')) {
-                var token = this.lookahead;
+                const token = this.lookahead;
                 id = this.parseVariableIdentifier();
                 if (this.context.strict) {
                     if (this.scanner.isRestrictedWord(token.value)) {
@@ -4385,21 +4319,21 @@ return /******/ (function(modules) { // webpackBootstrap
                     }
                 }
             }
-            var previousAllowAwait = this.context.await;
-            var previousAllowYield = this.context.allowYield;
+            const previousAllowAwait = this.context.await;
+            const previousAllowYield = this.context.allowYield;
             this.context.await = isAsync;
             this.context.allowYield = !isGenerator;
-            var formalParameters = this.parseFormalParameters(firstRestricted);
-            var params = formalParameters.params;
-            var stricted = formalParameters.stricted;
+            const formalParameters = this.parseFormalParameters(firstRestricted);
+            const params = formalParameters.params;
+            const stricted = formalParameters.stricted;
             firstRestricted = formalParameters.firstRestricted;
             if (formalParameters.message) {
                 message = formalParameters.message;
             }
-            var previousStrict = this.context.strict;
-            var previousAllowStrictDirective = this.context.allowStrictDirective;
+            const previousStrict = this.context.strict;
+            const previousAllowStrictDirective = this.context.allowStrictDirective;
             this.context.allowStrictDirective = formalParameters.simple;
-            var body = this.parseFunctionSourceElements();
+            const body = this.parseFunctionSourceElements();
             if (this.context.strict && firstRestricted) {
                 this.throwUnexpectedToken(firstRestricted, message);
             }
@@ -4410,29 +4344,29 @@ return /******/ (function(modules) { // webpackBootstrap
             this.context.allowStrictDirective = previousAllowStrictDirective;
             this.context.await = previousAllowAwait;
             this.context.allowYield = previousAllowYield;
-            return isAsync ? this.finalize(node, new Node.AsyncFunctionDeclaration(id, params, body)) :
+            return isAsync ? this.finalize(node, new Node.AsyncFunctionDeclaration(id, params, body, isGenerator)) :
                 this.finalize(node, new Node.FunctionDeclaration(id, params, body, isGenerator));
-        };
-        Parser.prototype.parseFunctionExpression = function () {
-            var node = this.createNode();
-            var isAsync = this.matchContextualKeyword('async');
+        }
+        parseFunctionExpression() {
+            const node = this.createNode();
+            const isAsync = this.matchContextualKeyword('async');
             if (isAsync) {
                 this.nextToken();
             }
             this.expectKeyword('function');
-            var isGenerator = isAsync ? false : this.match('*');
+            const isGenerator = this.match('*');
             if (isGenerator) {
                 this.nextToken();
             }
-            var message;
-            var id = null;
-            var firstRestricted;
-            var previousAllowAwait = this.context.await;
-            var previousAllowYield = this.context.allowYield;
+            let message;
+            let id = null;
+            let firstRestricted;
+            const previousAllowAwait = this.context.await;
+            const previousAllowYield = this.context.allowYield;
             this.context.await = isAsync;
             this.context.allowYield = !isGenerator;
             if (!this.match('(')) {
-                var token = this.lookahead;
+                const token = this.lookahead;
                 id = (!this.context.strict && !isGenerator && this.matchKeyword('yield')) ? this.parseIdentifierName() : this.parseVariableIdentifier();
                 if (this.context.strict) {
                     if (this.scanner.isRestrictedWord(token.value)) {
@@ -4450,17 +4384,17 @@ return /******/ (function(modules) { // webpackBootstrap
                     }
                 }
             }
-            var formalParameters = this.parseFormalParameters(firstRestricted);
-            var params = formalParameters.params;
-            var stricted = formalParameters.stricted;
+            const formalParameters = this.parseFormalParameters(firstRestricted);
+            const params = formalParameters.params;
+            const stricted = formalParameters.stricted;
             firstRestricted = formalParameters.firstRestricted;
             if (formalParameters.message) {
                 message = formalParameters.message;
             }
-            var previousStrict = this.context.strict;
-            var previousAllowStrictDirective = this.context.allowStrictDirective;
+            const previousStrict = this.context.strict;
+            const previousAllowStrictDirective = this.context.allowStrictDirective;
             this.context.allowStrictDirective = formalParameters.simple;
-            var body = this.parseFunctionSourceElements();
+            const body = this.parseFunctionSourceElements();
             if (this.context.strict && firstRestricted) {
                 this.throwUnexpectedToken(firstRestricted, message);
             }
@@ -4471,29 +4405,29 @@ return /******/ (function(modules) { // webpackBootstrap
             this.context.allowStrictDirective = previousAllowStrictDirective;
             this.context.await = previousAllowAwait;
             this.context.allowYield = previousAllowYield;
-            return isAsync ? this.finalize(node, new Node.AsyncFunctionExpression(id, params, body)) :
+            return isAsync ? this.finalize(node, new Node.AsyncFunctionExpression(id, params, body, isGenerator)) :
                 this.finalize(node, new Node.FunctionExpression(id, params, body, isGenerator));
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-directive-prologues-and-the-use-strict-directive
-        Parser.prototype.parseDirective = function () {
-            var token = this.lookahead;
-            var node = this.createNode();
-            var expr = this.parseExpression();
-            var directive = (expr.type === syntax_1.Syntax.Literal) ? this.getTokenRaw(token).slice(1, -1) : null;
+        parseDirective() {
+            const token = this.lookahead;
+            const node = this.createNode();
+            const expr = this.parseExpression();
+            const directive = (expr.type === syntax_1.Syntax.Literal) ? this.getTokenRaw(token).slice(1, -1) : null;
             this.consumeSemicolon();
             return this.finalize(node, directive ? new Node.Directive(expr, directive) : new Node.ExpressionStatement(expr));
-        };
-        Parser.prototype.parseDirectivePrologues = function () {
-            var firstRestricted = null;
-            var body = [];
+        }
+        parseDirectivePrologues() {
+            let firstRestricted = null;
+            const body = [];
             while (true) {
-                var token = this.lookahead;
+                const token = this.lookahead;
                 if (token.type !== 8 /* StringLiteral */) {
                     break;
                 }
-                var statement = this.parseDirective();
+                const statement = this.parseDirective();
                 body.push(statement);
-                var directive = statement.directive;
+                const directive = statement.directive;
                 if (typeof directive !== 'string') {
                     break;
                 }
@@ -4513,9 +4447,9 @@ return /******/ (function(modules) { // webpackBootstrap
                 }
             }
             return body;
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-method-definitions
-        Parser.prototype.qualifiedPropertyName = function (token) {
+        qualifiedPropertyName(token) {
             switch (token.type) {
                 case 3 /* Identifier */:
                 case 8 /* StringLiteral */:
@@ -4530,51 +4464,51 @@ return /******/ (function(modules) { // webpackBootstrap
                     break;
             }
             return false;
-        };
-        Parser.prototype.parseGetterMethod = function () {
-            var node = this.createNode();
-            var isGenerator = false;
-            var previousAllowYield = this.context.allowYield;
+        }
+        parseGetterMethod() {
+            const node = this.createNode();
+            const isGenerator = false;
+            const previousAllowYield = this.context.allowYield;
             this.context.allowYield = !isGenerator;
-            var formalParameters = this.parseFormalParameters();
+            const formalParameters = this.parseFormalParameters();
             if (formalParameters.params.length > 0) {
                 this.tolerateError(messages_1.Messages.BadGetterArity);
             }
-            var method = this.parsePropertyMethod(formalParameters);
+            const method = this.parsePropertyMethod(formalParameters);
             this.context.allowYield = previousAllowYield;
             return this.finalize(node, new Node.FunctionExpression(null, formalParameters.params, method, isGenerator));
-        };
-        Parser.prototype.parseSetterMethod = function () {
-            var node = this.createNode();
-            var isGenerator = false;
-            var previousAllowYield = this.context.allowYield;
+        }
+        parseSetterMethod() {
+            const node = this.createNode();
+            const isGenerator = false;
+            const previousAllowYield = this.context.allowYield;
             this.context.allowYield = !isGenerator;
-            var formalParameters = this.parseFormalParameters();
+            const formalParameters = this.parseFormalParameters();
             if (formalParameters.params.length !== 1) {
                 this.tolerateError(messages_1.Messages.BadSetterArity);
             }
             else if (formalParameters.params[0] instanceof Node.RestElement) {
                 this.tolerateError(messages_1.Messages.BadSetterRestParameter);
             }
-            var method = this.parsePropertyMethod(formalParameters);
+            const method = this.parsePropertyMethod(formalParameters);
             this.context.allowYield = previousAllowYield;
             return this.finalize(node, new Node.FunctionExpression(null, formalParameters.params, method, isGenerator));
-        };
-        Parser.prototype.parseGeneratorMethod = function () {
-            var node = this.createNode();
-            var isGenerator = true;
-            var previousAllowYield = this.context.allowYield;
+        }
+        parseGeneratorMethod() {
+            const node = this.createNode();
+            const isGenerator = true;
+            const previousAllowYield = this.context.allowYield;
             this.context.allowYield = true;
-            var params = this.parseFormalParameters();
+            const params = this.parseFormalParameters();
             this.context.allowYield = false;
-            var method = this.parsePropertyMethod(params);
+            const method = this.parsePropertyMethod(params);
             this.context.allowYield = previousAllowYield;
             return this.finalize(node, new Node.FunctionExpression(null, params.params, method, isGenerator));
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-generator-function-definitions
-        Parser.prototype.isStartOfExpression = function () {
-            var start = true;
-            var value = this.lookahead.value;
+        isStartOfExpression() {
+            let start = true;
+            const value = this.lookahead.value;
             switch (this.lookahead.type) {
                 case 7 /* Punctuator */:
                     start = (value === '[') || (value === '(') || (value === '{') ||
@@ -4593,14 +4527,14 @@ return /******/ (function(modules) { // webpackBootstrap
                     break;
             }
             return start;
-        };
-        Parser.prototype.parseYieldExpression = function () {
-            var node = this.createNode();
+        }
+        parseYieldExpression() {
+            const node = this.createNode();
             this.expectKeyword('yield');
-            var argument = null;
-            var delegate = false;
+            let argument = null;
+            let delegate = false;
             if (!this.hasLineTerminator) {
-                var previousAllowYield = this.context.allowYield;
+                const previousAllowYield = this.context.allowYield;
                 this.context.allowYield = false;
                 delegate = this.match('*');
                 if (delegate) {
@@ -4613,25 +4547,26 @@ return /******/ (function(modules) { // webpackBootstrap
                 this.context.allowYield = previousAllowYield;
             }
             return this.finalize(node, new Node.YieldExpression(argument, delegate));
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-class-definitions
-        Parser.prototype.parseClassElement = function (hasConstructor) {
-            var token = this.lookahead;
-            var node = this.createNode();
-            var kind = '';
-            var key = null;
-            var value = null;
-            var computed = false;
-            var method = false;
-            var isStatic = false;
-            var isAsync = false;
+        parseClassElement(hasConstructor) {
+            let token = this.lookahead;
+            const node = this.createNode();
+            let kind = '';
+            let key = null;
+            let value = null;
+            let computed = false;
+            let method = false;
+            let isStatic = false;
+            let isAsync = false;
+            let isAsyncGenerator = false;
             if (this.match('*')) {
                 this.nextToken();
             }
             else {
                 computed = this.match('[');
                 key = this.parseObjectPropertyKey();
-                var id = key;
+                const id = key;
                 if (id.name === 'static' && (this.qualifiedPropertyName(this.lookahead) || this.match('*'))) {
                     token = this.lookahead;
                     isStatic = true;
@@ -4644,9 +4579,13 @@ return /******/ (function(modules) { // webpackBootstrap
                     }
                 }
                 if ((token.type === 3 /* Identifier */) && !this.hasLineTerminator && (token.value === 'async')) {
-                    var punctuator = this.lookahead.value;
-                    if (punctuator !== ':' && punctuator !== '(' && punctuator !== '*') {
+                    const punctuator = this.lookahead.value;
+                    if (punctuator !== ':' && punctuator !== '(') {
                         isAsync = true;
+                        isAsyncGenerator = this.match('*');
+                        if (isAsyncGenerator) {
+                            this.nextToken();
+                        }
                         token = this.lookahead;
                         key = this.parseObjectPropertyKey();
                         if (token.type === 3 /* Identifier */ && token.value === 'constructor') {
@@ -4655,7 +4594,7 @@ return /******/ (function(modules) { // webpackBootstrap
                     }
                 }
             }
-            var lookaheadPropertyKey = this.qualifiedPropertyName(this.lookahead);
+            const lookaheadPropertyKey = this.qualifiedPropertyName(this.lookahead);
             if (token.type === 3 /* Identifier */) {
                 if (token.value === 'get' && lookaheadPropertyKey) {
                     kind = 'get';
@@ -4680,7 +4619,7 @@ return /******/ (function(modules) { // webpackBootstrap
             }
             if (!kind && key && this.match('(')) {
                 kind = 'init';
-                value = isAsync ? this.parsePropertyMethodAsyncFunction() : this.parsePropertyMethodFunction();
+                value = isAsync ? this.parsePropertyMethodAsyncFunction(isAsyncGenerator) : this.parsePropertyMethodFunction();
                 method = true;
             }
             if (!kind) {
@@ -4707,10 +4646,10 @@ return /******/ (function(modules) { // webpackBootstrap
                 }
             }
             return this.finalize(node, new Node.MethodDefinition(key, computed, value, kind, isStatic));
-        };
-        Parser.prototype.parseClassElementList = function () {
-            var body = [];
-            var hasConstructor = { value: false };
+        }
+        parseClassElementList() {
+            const body = [];
+            const hasConstructor = { value: false };
             this.expect('{');
             while (!this.match('}')) {
                 if (this.match(';')) {
@@ -4722,78 +4661,78 @@ return /******/ (function(modules) { // webpackBootstrap
             }
             this.expect('}');
             return body;
-        };
-        Parser.prototype.parseClassBody = function () {
-            var node = this.createNode();
-            var elementList = this.parseClassElementList();
+        }
+        parseClassBody() {
+            const node = this.createNode();
+            const elementList = this.parseClassElementList();
             return this.finalize(node, new Node.ClassBody(elementList));
-        };
-        Parser.prototype.parseClassDeclaration = function (identifierIsOptional) {
-            var node = this.createNode();
-            var previousStrict = this.context.strict;
+        }
+        parseClassDeclaration(identifierIsOptional) {
+            const node = this.createNode();
+            const previousStrict = this.context.strict;
             this.context.strict = true;
             this.expectKeyword('class');
-            var id = (identifierIsOptional && (this.lookahead.type !== 3 /* Identifier */)) ? null : this.parseVariableIdentifier();
-            var superClass = null;
+            const id = (identifierIsOptional && (this.lookahead.type !== 3 /* Identifier */)) ? null : this.parseVariableIdentifier();
+            let superClass = null;
             if (this.matchKeyword('extends')) {
                 this.nextToken();
                 superClass = this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall);
             }
-            var classBody = this.parseClassBody();
+            const classBody = this.parseClassBody();
             this.context.strict = previousStrict;
             return this.finalize(node, new Node.ClassDeclaration(id, superClass, classBody));
-        };
-        Parser.prototype.parseClassExpression = function () {
-            var node = this.createNode();
-            var previousStrict = this.context.strict;
+        }
+        parseClassExpression() {
+            const node = this.createNode();
+            const previousStrict = this.context.strict;
             this.context.strict = true;
             this.expectKeyword('class');
-            var id = (this.lookahead.type === 3 /* Identifier */) ? this.parseVariableIdentifier() : null;
-            var superClass = null;
+            const id = (this.lookahead.type === 3 /* Identifier */) ? this.parseVariableIdentifier() : null;
+            let superClass = null;
             if (this.matchKeyword('extends')) {
                 this.nextToken();
                 superClass = this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall);
             }
-            var classBody = this.parseClassBody();
+            const classBody = this.parseClassBody();
             this.context.strict = previousStrict;
             return this.finalize(node, new Node.ClassExpression(id, superClass, classBody));
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-scripts
         // https://tc39.github.io/ecma262/#sec-modules
-        Parser.prototype.parseModule = function () {
+        parseModule() {
             this.context.strict = true;
             this.context.isModule = true;
             this.scanner.isModule = true;
-            var node = this.createNode();
-            var body = this.parseDirectivePrologues();
+            const node = this.createNode();
+            const body = this.parseDirectivePrologues();
             while (this.lookahead.type !== 2 /* EOF */) {
                 body.push(this.parseStatementListItem());
             }
             return this.finalize(node, new Node.Module(body));
-        };
-        Parser.prototype.parseScript = function () {
-            var node = this.createNode();
-            var body = this.parseDirectivePrologues();
+        }
+        parseScript() {
+            const node = this.createNode();
+            const body = this.parseDirectivePrologues();
             while (this.lookahead.type !== 2 /* EOF */) {
                 body.push(this.parseStatementListItem());
             }
             return this.finalize(node, new Node.Script(body));
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-imports
-        Parser.prototype.parseModuleSpecifier = function () {
-            var node = this.createNode();
+        parseModuleSpecifier() {
+            const node = this.createNode();
             if (this.lookahead.type !== 8 /* StringLiteral */) {
                 this.throwError(messages_1.Messages.InvalidModuleSpecifier);
             }
-            var token = this.nextToken();
-            var raw = this.getTokenRaw(token);
+            const token = this.nextToken();
+            const raw = this.getTokenRaw(token);
             return this.finalize(node, new Node.Literal(token.value, raw));
-        };
+        }
         // import {<foo as bar>} ...;
-        Parser.prototype.parseImportSpecifier = function () {
-            var node = this.createNode();
-            var imported;
-            var local;
+        parseImportSpecifier() {
+            const node = this.createNode();
+            let imported;
+            let local;
             if (this.lookahead.type === 3 /* Identifier */) {
                 imported = this.parseVariableIdentifier();
                 local = imported;
@@ -4814,11 +4753,11 @@ return /******/ (function(modules) { // webpackBootstrap
                 }
             }
             return this.finalize(node, new Node.ImportSpecifier(local, imported));
-        };
+        }
         // {foo, bar as bas}
-        Parser.prototype.parseNamedImports = function () {
+        parseNamedImports() {
             this.expect('{');
-            var specifiers = [];
+            const specifiers = [];
             while (!this.match('}')) {
                 specifiers.push(this.parseImportSpecifier());
                 if (!this.match('}')) {
@@ -4827,32 +4766,32 @@ return /******/ (function(modules) { // webpackBootstrap
             }
             this.expect('}');
             return specifiers;
-        };
+        }
         // import <foo> ...;
-        Parser.prototype.parseImportDefaultSpecifier = function () {
-            var node = this.createNode();
-            var local = this.parseIdentifierName();
+        parseImportDefaultSpecifier() {
+            const node = this.createNode();
+            const local = this.parseIdentifierName();
             return this.finalize(node, new Node.ImportDefaultSpecifier(local));
-        };
+        }
         // import <* as foo> ...;
-        Parser.prototype.parseImportNamespaceSpecifier = function () {
-            var node = this.createNode();
+        parseImportNamespaceSpecifier() {
+            const node = this.createNode();
             this.expect('*');
             if (!this.matchContextualKeyword('as')) {
                 this.throwError(messages_1.Messages.NoAsAfterImportNamespace);
             }
             this.nextToken();
-            var local = this.parseIdentifierName();
+            const local = this.parseIdentifierName();
             return this.finalize(node, new Node.ImportNamespaceSpecifier(local));
-        };
-        Parser.prototype.parseImportDeclaration = function () {
+        }
+        parseImportDeclaration() {
             if (this.context.inFunctionBody) {
                 this.throwError(messages_1.Messages.IllegalImportDeclaration);
             }
-            var node = this.createNode();
+            const node = this.createNode();
             this.expectKeyword('import');
-            var src;
-            var specifiers = [];
+            let src;
+            let specifiers = [];
             if (this.lookahead.type === 8 /* StringLiteral */) {
                 // import 'foo';
                 src = this.parseModuleSpecifier();
@@ -4888,7 +4827,7 @@ return /******/ (function(modules) { // webpackBootstrap
                     this.throwUnexpectedToken(this.nextToken());
                 }
                 if (!this.matchContextualKeyword('from')) {
-                    var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause;
+                    const message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause;
                     this.throwError(message, this.lookahead.value);
                 }
                 this.nextToken();
@@ -4896,44 +4835,44 @@ return /******/ (function(modules) { // webpackBootstrap
             }
             this.consumeSemicolon();
             return this.finalize(node, new Node.ImportDeclaration(specifiers, src));
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-exports
-        Parser.prototype.parseExportSpecifier = function () {
-            var node = this.createNode();
-            var local = this.parseIdentifierName();
-            var exported = local;
+        parseExportSpecifier() {
+            const node = this.createNode();
+            const local = this.parseIdentifierName();
+            let exported = local;
             if (this.matchContextualKeyword('as')) {
                 this.nextToken();
                 exported = this.parseIdentifierName();
             }
             return this.finalize(node, new Node.ExportSpecifier(local, exported));
-        };
-        Parser.prototype.parseExportDeclaration = function () {
+        }
+        parseExportDeclaration() {
             if (this.context.inFunctionBody) {
                 this.throwError(messages_1.Messages.IllegalExportDeclaration);
             }
-            var node = this.createNode();
+            const node = this.createNode();
             this.expectKeyword('export');
-            var exportDeclaration;
+            let exportDeclaration;
             if (this.matchKeyword('default')) {
                 // export default ...
                 this.nextToken();
                 if (this.matchKeyword('function')) {
                     // export default function foo () {}
                     // export default function () {}
-                    var declaration = this.parseFunctionDeclaration(true);
+                    const declaration = this.parseFunctionDeclaration(true);
                     exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration));
                 }
                 else if (this.matchKeyword('class')) {
                     // export default class foo {}
-                    var declaration = this.parseClassDeclaration(true);
+                    const declaration = this.parseClassDeclaration(true);
                     exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration));
                 }
                 else if (this.matchContextualKeyword('async')) {
                     // export default async function f () {}
                     // export default async function () {}
                     // export default async x => x
-                    var declaration = this.matchAsyncFunction() ? this.parseFunctionDeclaration(true) : this.parseAssignmentExpression();
+                    const declaration = this.matchAsyncFunction() ? this.parseFunctionDeclaration(true) : this.parseAssignmentExpression();
                     exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration));
                 }
                 else {
@@ -4943,7 +4882,7 @@ return /******/ (function(modules) { // webpackBootstrap
                     // export default {};
                     // export default [];
                     // export default (1 + 2);
-                    var declaration = this.match('{') ? this.parseObjectInitializer() :
+                    const declaration = this.match('{') ? this.parseObjectInitializer() :
                         this.match('[') ? this.parseArrayInitializer() : this.parseAssignmentExpression();
                     this.consumeSemicolon();
                     exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration));
@@ -4953,17 +4892,17 @@ return /******/ (function(modules) { // webpackBootstrap
                 // export * from 'foo';
                 this.nextToken();
                 if (!this.matchContextualKeyword('from')) {
-                    var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause;
+                    const message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause;
                     this.throwError(message, this.lookahead.value);
                 }
                 this.nextToken();
-                var src = this.parseModuleSpecifier();
+                const src = this.parseModuleSpecifier();
                 this.consumeSemicolon();
                 exportDeclaration = this.finalize(node, new Node.ExportAllDeclaration(src));
             }
             else if (this.lookahead.type === 4 /* Keyword */) {
                 // export var f = 1;
-                var declaration = void 0;
+                let declaration;
                 switch (this.lookahead.value) {
                     case 'let':
                     case 'const':
@@ -4980,13 +4919,13 @@ return /******/ (function(modules) { // webpackBootstrap
                 exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(declaration, [], null));
             }
             else if (this.matchAsyncFunction()) {
-                var declaration = this.parseFunctionDeclaration();
+                const declaration = this.parseFunctionDeclaration();
                 exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(declaration, [], null));
             }
             else {
-                var specifiers = [];
-                var source = null;
-                var isExportFromIdentifier = false;
+                const specifiers = [];
+                let source = null;
+                let isExportFromIdentifier = false;
                 this.expect('{');
                 while (!this.match('}')) {
                     isExportFromIdentifier = isExportFromIdentifier || this.matchKeyword('default');
@@ -5005,7 +4944,7 @@ return /******/ (function(modules) { // webpackBootstrap
                 }
                 else if (isExportFromIdentifier) {
                     // export {default}; // missing fromClause
-                    var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause;
+                    const message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause;
                     this.throwError(message, this.lookahead.value);
                 }
                 else {
@@ -5015,9 +4954,8 @@ return /******/ (function(modules) { // webpackBootstrap
                 exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(null, specifiers, source));
             }
             return exportDeclaration;
-        };
-        return Parser;
-    }());
+        }
+    }
     exports.Parser = Parser;
 
 
@@ -5047,24 +4985,24 @@ return /******/ (function(modules) { // webpackBootstrap
     "use strict";
     /* tslint:disable:max-classes-per-file */
     Object.defineProperty(exports, "__esModule", { value: true });
-    var ErrorHandler = /** @class */ (function () {
-        function ErrorHandler() {
+    class ErrorHandler {
+        constructor() {
             this.errors = [];
             this.tolerant = false;
         }
-        ErrorHandler.prototype.recordError = function (error) {
+        recordError(error) {
             this.errors.push(error);
-        };
-        ErrorHandler.prototype.tolerate = function (error) {
+        }
+        tolerate(error) {
             if (this.tolerant) {
                 this.recordError(error);
             }
             else {
                 throw error;
             }
-        };
-        ErrorHandler.prototype.constructError = function (msg, column) {
-            var error = new Error(msg);
+        }
+        constructError(msg, column) {
+            let error = new Error(msg);
             try {
                 throw error;
             }
@@ -5077,29 +5015,28 @@ return /******/ (function(modules) { // webpackBootstrap
             }
             /* istanbul ignore next */
             return error;
-        };
-        ErrorHandler.prototype.createError = function (index, line, col, description) {
-            var msg = 'Line ' + line + ': ' + description;
-            var error = this.constructError(msg, col);
+        }
+        createError(index, line, col, description) {
+            const msg = 'Line ' + line + ': ' + description;
+            const error = this.constructError(msg, col);
             error.index = index;
             error.lineNumber = line;
             error.description = description;
             return error;
-        };
-        ErrorHandler.prototype.throwError = function (index, line, col, description) {
+        }
+        throwError(index, line, col, description) {
             throw this.createError(index, line, col, description);
-        };
-        ErrorHandler.prototype.tolerateError = function (index, line, col, description) {
-            var error = this.createError(index, line, col, description);
+        }
+        tolerateError(index, line, col, description) {
+            const error = this.createError(index, line, col, description);
             if (this.tolerant) {
                 this.recordError(error);
             }
             else {
                 throw error;
             }
-        };
-        return ErrorHandler;
-    }());
+        }
+    }
     exports.ErrorHandler = ErrorHandler;
 
 
@@ -5123,6 +5060,9 @@ return /******/ (function(modules) { // webpackBootstrap
         DuplicateBinding: 'Duplicate binding %0',
         DuplicateConstructor: 'A class may only have one constructor',
         DuplicateProtoProperty: 'Duplicate __proto__ fields are not allowed in object literals',
+        ForAwaitInNonAsync: 'for-await-of can only be used in an async function or async generator',
+        ForAwaitOfSemicolon: 'Unexpected \';\' in for-await-of header',
+        ForAwaitOfSawIn: 'Unexpected \'in\' in for-await-of header',
         ForInOfLoopInitializer: '%0 loop variable declaration may not have an initializer',
         GeneratorInLegacyContext: 'Generator declarations are not allowed in legacy contexts',
         IllegalBreak: 'Illegal break statement',
@@ -5137,6 +5077,8 @@ return /******/ (function(modules) { // webpackBootstrap
         InvalidLHSInForIn: 'Invalid left-hand side in for-in',
         InvalidLHSInForLoop: 'Invalid left-hand side in for-loop',
         InvalidModuleSpecifier: 'Unexpected token',
+        InvalidNumericSeparatorAfterLeadingZero: 'Numeric serparator can not be used after leading 0',
+        InvalidNumericSeparatorAfterNumericLiteral: 'Numeric separators are not allowed at the end of numeric literals',
         InvalidRegExp: 'Invalid regular expression',
         LetInLexicalBinding: 'let is disallowed as a lexically bound name',
         MissingFromClause: 'Unexpected token',
@@ -5181,17 +5123,17 @@ return /******/ (function(modules) { // webpackBootstrap
 
     "use strict";
     Object.defineProperty(exports, "__esModule", { value: true });
-    var assert_1 = __webpack_require__(9);
-    var character_1 = __webpack_require__(4);
-    var messages_1 = __webpack_require__(11);
+    const assert_1 = __webpack_require__(9);
+    const character_1 = __webpack_require__(4);
+    const messages_1 = __webpack_require__(11);
     function hexValue(ch) {
         return '0123456789abcdef'.indexOf(ch.toLowerCase());
     }
     function octalValue(ch) {
         return '01234567'.indexOf(ch);
     }
-    var Scanner = /** @class */ (function () {
-        function Scanner(code, handler) {
+    class Scanner {
+        constructor(code, handler) {
             this.source = code;
             this.errorHandler = handler;
             this.trackComment = false;
@@ -5202,33 +5144,31 @@ return /******/ (function(modules) { // webpackBootstrap
             this.lineStart = 0;
             this.curlyStack = [];
         }
-        Scanner.prototype.saveState = function () {
+        saveState() {
             return {
                 index: this.index,
                 lineNumber: this.lineNumber,
                 lineStart: this.lineStart
             };
-        };
-        Scanner.prototype.restoreState = function (state) {
+        }
+        restoreState(state) {
             this.index = state.index;
             this.lineNumber = state.lineNumber;
             this.lineStart = state.lineStart;
-        };
-        Scanner.prototype.eof = function () {
+        }
+        eof() {
             return this.index >= this.length;
-        };
-        Scanner.prototype.throwUnexpectedToken = function (message) {
-            if (message === void 0) { message = messages_1.Messages.UnexpectedTokenIllegal; }
+        }
+        throwUnexpectedToken(message = messages_1.Messages.UnexpectedTokenIllegal) {
             return this.errorHandler.throwError(this.index, this.lineNumber, this.index - this.lineStart + 1, message);
-        };
-        Scanner.prototype.tolerateUnexpectedToken = function (message) {
-            if (message === void 0) { message = messages_1.Messages.UnexpectedTokenIllegal; }
+        }
+        tolerateUnexpectedToken(message = messages_1.Messages.UnexpectedTokenIllegal) {
             this.errorHandler.tolerateError(this.index, this.lineNumber, this.index - this.lineStart + 1, message);
-        };
+        }
         // https://tc39.github.io/ecma262/#sec-comments
-        Scanner.prototype.skipSingleLineComment = function (offset) {
-            var comments = [];
-            var start, loc;
+        skipSingleLineComment(offset) {
+            let comments = [];
+            let start, loc;
             if (this.trackComment) {
                 comments = [];
                 start = this.index - offset;
@@ -5241,7 +5181,7 @@ return /******/ (function(modules) { // webpackBootstrap
                 };
             }
             while (!this.eof()) {
-                var ch = this.source.charCodeAt(this.index);
+                const ch = this.source.charCodeAt(this.index);
                 ++this.index;
                 if (character_1.Character.isLineTerminator(ch)) {
                     if (this.trackComment) {
@@ -5249,7 +5189,7 @@ return /******/ (function(modules) { // webpackBootstrap
                             line: this.lineNumber,
                             column: this.index - this.lineStart - 1
                         };
-                        var entry = {
+                        const entry = {
                             multiLine: false,
                             slice: [start + offset, this.index - 1],
                             range: [start, this.index - 1],
@@ -5270,7 +5210,7 @@ return /******/ (function(modules) { // webpackBootstrap
                     line: this.lineNumber,
                     column: this.index - this.lineStart
                 };
-                var entry = {
+                const entry = {
                     multiLine: false,
                     slice: [start + offset, this.index],
                     range: [start, this.index],
@@ -5279,10 +5219,10 @@ return /******/ (function(modules) { // webpackBootstrap
                 comments.push(entry);
             }
             return comments;
-        };
-        Scanner.prototype.skipMultiLineComment = function () {
-            var comments = [];
-            var start, loc;
+        }
+        skipMultiLineComment() {
+            let comments = [];
+            let start, loc;
             if (this.trackComment) {
                 comments = [];
                 start = this.index - 2;
@@ -5295,7 +5235,7 @@ return /******/ (function(modules) { // webpackBootstrap
                 };
             }
             while (!this.eof()) {
-                var ch = this.source.charCodeAt(this.index);
+                const ch = this.source.charCodeAt(this.index);
                 if (character_1.Character.isLineTerminator(ch)) {
                     if (ch === 0x0D && this.source.charCodeAt(this.index + 1) === 0x0A) {
                         ++this.index;
@@ -5313,7 +5253,7 @@ return /******/ (function(modules) { // webpackBootstrap
                                 line: this.lineNumber,