diff --git a/src/parser/expression.js b/src/parser/expression.js index 56bf019561..c651edaf20 100644 --- a/src/parser/expression.js +++ b/src/parser/expression.js @@ -331,14 +331,12 @@ export default class ExpressionParser extends LValParser { if (arg.type === "Identifier") { this.raise(node.start, "Deleting local variable in strict mode"); - } else if (this.hasPlugin("classPrivateProperties")) { - if ( - arg.type === "PrivateName" || - (arg.type === "MemberExpression" && - arg.property.type === "PrivateName") - ) { - this.raise(node.start, "Deleting a private field is not allowed"); - } + } else if ( + this.hasPlugin("classPrivateProperties") && + arg.type === "MemberExpression" && + arg.property.type === "PrivateName" + ) { + this.raise(node.start, "Deleting a private field is not allowed"); } } @@ -747,13 +745,6 @@ export default class ExpressionParser extends LValParser { this.takeDecorators(node); return this.parseClass(node, false); - case tt.hash: - if (this.hasPlugin("classPrivateProperties")) { - return this.parseMaybePrivateName(); - } else { - throw this.unexpected(); - } - case tt._new: return this.parseNew(); diff --git a/src/parser/lval.js b/src/parser/lval.js index 0d09a6a85f..585b200fbb 100644 --- a/src/parser/lval.js +++ b/src/parser/lval.js @@ -49,7 +49,6 @@ export default class LValParser extends NodeUtils { if (node) { switch (node.type) { case "Identifier": - case "PrivateName": case "ObjectPattern": case "ArrayPattern": case "AssignmentPattern": @@ -300,7 +299,6 @@ export default class LValParser extends NodeUtils { contextDescription: string, ): void { switch (expr.type) { - case "PrivateName": case "Identifier": this.checkReservedWord(expr.name, expr.start, false, true); diff --git a/test/fixtures/experimental/class-private-properties/asi-failure-generator/options.json b/test/fixtures/experimental/class-private-properties/asi-failure-generator/options.json index 0541546800..aee588d459 100644 --- a/test/fixtures/experimental/class-private-properties/asi-failure-generator/options.json +++ b/test/fixtures/experimental/class-private-properties/asi-failure-generator/options.json @@ -1,4 +1,4 @@ { - "throws": "Unexpected token, expected ; (3:9)", + "throws": "Unexpected token (3:3)", "plugins": ["classProperties", "classPrivateProperties"] } diff --git a/test/fixtures/experimental/class-private-properties/delete-non-private/actual.js b/test/fixtures/experimental/class-private-properties/delete-non-private/actual.js deleted file mode 100644 index eedc4456bc..0000000000 --- a/test/fixtures/experimental/class-private-properties/delete-non-private/actual.js +++ /dev/null @@ -1,6 +0,0 @@ -class Foo { - #x; - constructor() { - delete #x.d; - } -} diff --git a/test/fixtures/experimental/class-private-properties/delete-non-private/expected.json b/test/fixtures/experimental/class-private-properties/delete-non-private/expected.json deleted file mode 100644 index 873050141d..0000000000 --- a/test/fixtures/experimental/class-private-properties/delete-non-private/expected.json +++ /dev/null @@ -1,276 +0,0 @@ -{ - "type": "File", - "start": 0, - "end": 58, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 6, - "column": 1 - } - }, - "program": { - "type": "Program", - "start": 0, - "end": 58, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 6, - "column": 1 - } - }, - "sourceType": "script", - "body": [ - { - "type": "ClassDeclaration", - "start": 0, - "end": 58, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 6, - "column": 1 - } - }, - "id": { - "type": "Identifier", - "start": 6, - "end": 9, - "loc": { - "start": { - "line": 1, - "column": 6 - }, - "end": { - "line": 1, - "column": 9 - }, - "identifierName": "Foo" - }, - "name": "Foo" - }, - "superClass": null, - "body": { - "type": "ClassBody", - "start": 10, - "end": 58, - "loc": { - "start": { - "line": 1, - "column": 10 - }, - "end": { - "line": 6, - "column": 1 - } - }, - "body": [ - { - "type": "ClassPrivateProperty", - "start": 14, - "end": 17, - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 5 - } - }, - "key": { - "type": "Identifier", - "start": 15, - "end": 16, - "loc": { - "start": { - "line": 2, - "column": 3 - }, - "end": { - "line": 2, - "column": 4 - }, - "identifierName": "x" - }, - "name": "x" - }, - "static": false, - "value": null - }, - { - "type": "ClassMethod", - "start": 20, - "end": 56, - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 5, - "column": 3 - } - }, - "static": false, - "computed": false, - "key": { - "type": "Identifier", - "start": 20, - "end": 31, - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 13 - }, - "identifierName": "constructor" - }, - "name": "constructor" - }, - "kind": "constructor", - "id": null, - "generator": false, - "expression": false, - "async": false, - "params": [], - "body": { - "type": "BlockStatement", - "start": 34, - "end": 56, - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 5, - "column": 3 - } - }, - "body": [ - { - "type": "ExpressionStatement", - "start": 40, - "end": 52, - "loc": { - "start": { - "line": 4, - "column": 4 - }, - "end": { - "line": 4, - "column": 16 - } - }, - "expression": { - "type": "UnaryExpression", - "start": 40, - "end": 51, - "loc": { - "start": { - "line": 4, - "column": 4 - }, - "end": { - "line": 4, - "column": 15 - } - }, - "operator": "delete", - "prefix": true, - "argument": { - "type": "MemberExpression", - "start": 47, - "end": 51, - "loc": { - "start": { - "line": 4, - "column": 11 - }, - "end": { - "line": 4, - "column": 15 - } - }, - "object": { - "type": "PrivateName", - "start": 48, - "end": 49, - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 13 - } - }, - "name": { - "type": "Identifier", - "start": 48, - "end": 49, - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 13 - }, - "identifierName": "x" - }, - "name": "x" - } - }, - "property": { - "type": "Identifier", - "start": 50, - "end": 51, - "loc": { - "start": { - "line": 4, - "column": 14 - }, - "end": { - "line": 4, - "column": 15 - }, - "identifierName": "d" - }, - "name": "d" - }, - "computed": false - }, - "extra": { - "parenthesizedArgument": false - } - } - } - ], - "directives": [] - } - } - ] - } - } - ], - "directives": [] - } -} diff --git a/test/fixtures/experimental/class-private-properties/delete-non-private/options.json b/test/fixtures/experimental/class-private-properties/delete-non-private/options.json deleted file mode 100644 index 19c38d2996..0000000000 --- a/test/fixtures/experimental/class-private-properties/delete-non-private/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": ["classProperties", "classPrivateProperties"] -} diff --git a/test/fixtures/experimental/class-private-properties/failure-delete-shorthand/actual.js b/test/fixtures/experimental/class-private-properties/failure-shorthand/actual.js similarity index 100% rename from test/fixtures/experimental/class-private-properties/failure-delete-shorthand/actual.js rename to test/fixtures/experimental/class-private-properties/failure-shorthand/actual.js diff --git a/test/fixtures/experimental/class-private-properties/failure-delete-shorthand/options.json b/test/fixtures/experimental/class-private-properties/failure-shorthand/options.json similarity index 55% rename from test/fixtures/experimental/class-private-properties/failure-delete-shorthand/options.json rename to test/fixtures/experimental/class-private-properties/failure-shorthand/options.json index 32979c4d9e..cfd26b03c5 100644 --- a/test/fixtures/experimental/class-private-properties/failure-delete-shorthand/options.json +++ b/test/fixtures/experimental/class-private-properties/failure-shorthand/options.json @@ -1,5 +1,5 @@ { - "throws": "Deleting a private field is not allowed (4:4)", + "throws": "Unexpected token (4:11)", "plugins": [ "classProperties", "classPrivateProperties" diff --git a/test/fixtures/experimental/class-private-properties/nested/actual.js b/test/fixtures/experimental/class-private-properties/nested/actual.js index bf4c9489d5..a09f9093a7 100644 --- a/test/fixtures/experimental/class-private-properties/nested/actual.js +++ b/test/fixtures/experimental/class-private-properties/nested/actual.js @@ -1,40 +1,39 @@ class Point { - #x = 1; - #y = 2; + #x = 1; + #y = 2; - constructor(x = 0, y = 0) { - #x = +x; - #y = +y; + constructor(x = 0, y = 0) { + this.#x = +x; + this.#y = +y; + this.foo = class { + #x = 1; + #y = 2; - this.foo = class { - #x = 1; - #y = 2; + constructor(x = 0, y = 0) { + this.#x = +x; + this.#y = +y; + } - constructor(x = 0, y = 0) { - #x = +x; - #y = +y; - } + get x() { return this.#x } + set x(value) { this.#x = +value } - get x() { return #x } - set x(value) { #x = +value } + get y() { return this.#y } + set y(value) { this.#y = +value } - get y() { return #y } - set y(value) { #y = +value } + equals(p) { return this.#x === p.#x && this.#y === p.#y } - equals(p) { return #x === p.#x && #y === p.#y } + toString() { return `Point<${ this.#x },${ this.#y }>` } + }; + } - toString() { return `Point<${ #x },${ #y }>` } - }; - } + get x() { return this.#x } + set x(value) { this.#x = +value } - get x() { return #x } - set x(value) { #x = +value } + get y() { return this.#y } + set y(value) { this.#y = +value } - get y() { return #y } - set y(value) { #y = +value } + equals(p) { return this.#x === p.#x && this.#y === p.#y } - equals(p) { return #x === p.#x && #y === p.#y } - - toString() { return `Point<${ #x },${ #y }>` } + toString() { return `Point<${ this.#x },${ this.#y }>` } } diff --git a/test/fixtures/experimental/class-private-properties/nested/expected.json b/test/fixtures/experimental/class-private-properties/nested/expected.json index a43e99bcb9..621bfdf044 100644 --- a/test/fixtures/experimental/class-private-properties/nested/expected.json +++ b/test/fixtures/experimental/class-private-properties/nested/expected.json @@ -1,28 +1,28 @@ { "type": "File", "start": 0, - "end": 795, + "end": 782, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 40, + "line": 39, "column": 1 } }, "program": { "type": "Program", "start": 0, - "end": 795, + "end": 782, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 40, + "line": 39, "column": 1 } }, @@ -31,14 +31,14 @@ { "type": "ClassDeclaration", "start": 0, - "end": 795, + "end": 782, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 40, + "line": 39, "column": 1 } }, @@ -63,44 +63,44 @@ "body": { "type": "ClassBody", "start": 12, - "end": 795, + "end": 782, "loc": { "start": { "line": 1, "column": 12 }, "end": { - "line": 40, + "line": 39, "column": 1 } }, "body": [ { "type": "ClassPrivateProperty", - "start": 18, - "end": 25, + "start": 16, + "end": 23, "loc": { "start": { "line": 2, - "column": 4 + "column": 2 }, "end": { "line": 2, - "column": 11 + "column": 9 } }, "key": { "type": "Identifier", - "start": 19, - "end": 20, + "start": 17, + "end": 18, "loc": { "start": { "line": 2, - "column": 5 + "column": 3 }, "end": { "line": 2, - "column": 6 + "column": 4 }, "identifierName": "x" }, @@ -109,16 +109,16 @@ "static": false, "value": { "type": "NumericLiteral", - "start": 23, - "end": 24, + "start": 21, + "end": 22, "loc": { "start": { "line": 2, - "column": 9 + "column": 7 }, "end": { "line": 2, - "column": 10 + "column": 8 } }, "extra": { @@ -130,30 +130,30 @@ }, { "type": "ClassPrivateProperty", - "start": 30, - "end": 37, + "start": 26, + "end": 33, "loc": { "start": { "line": 3, - "column": 4 + "column": 2 }, "end": { "line": 3, - "column": 11 + "column": 9 } }, "key": { "type": "Identifier", - "start": 31, - "end": 32, + "start": 27, + "end": 28, "loc": { "start": { "line": 3, - "column": 5 + "column": 3 }, "end": { "line": 3, - "column": 6 + "column": 4 }, "identifierName": "y" }, @@ -162,16 +162,16 @@ "static": false, "value": { "type": "NumericLiteral", - "start": 35, - "end": 36, + "start": 31, + "end": 32, "loc": { "start": { "line": 3, - "column": 9 + "column": 7 }, "end": { "line": 3, - "column": 10 + "column": 8 } }, "extra": { @@ -183,32 +183,32 @@ }, { "type": "ClassMethod", - "start": 43, - "end": 568, + "start": 37, + "end": 527, "loc": { "start": { "line": 5, - "column": 4 + "column": 2 }, "end": { - "line": 29, - "column": 5 + "line": 28, + "column": 3 } }, "static": false, "computed": false, "key": { "type": "Identifier", - "start": 43, - "end": 54, + "start": 37, + "end": 48, "loc": { "start": { "line": 5, - "column": 4 + "column": 2 }, "end": { "line": 5, - "column": 15 + "column": 13 }, "identifierName": "constructor" }, @@ -222,30 +222,30 @@ "params": [ { "type": "AssignmentPattern", - "start": 55, - "end": 60, + "start": 49, + "end": 54, "loc": { "start": { "line": 5, - "column": 16 + "column": 14 }, "end": { "line": 5, - "column": 21 + "column": 19 } }, "left": { "type": "Identifier", - "start": 55, - "end": 56, + "start": 49, + "end": 50, "loc": { "start": { "line": 5, - "column": 16 + "column": 14 }, "end": { "line": 5, - "column": 17 + "column": 15 }, "identifierName": "x" }, @@ -253,16 +253,16 @@ }, "right": { "type": "NumericLiteral", - "start": 59, - "end": 60, + "start": 53, + "end": 54, "loc": { "start": { "line": 5, - "column": 20 + "column": 18 }, "end": { "line": 5, - "column": 21 + "column": 19 } }, "extra": { @@ -274,30 +274,30 @@ }, { "type": "AssignmentPattern", - "start": 62, - "end": 67, + "start": 56, + "end": 61, "loc": { "start": { "line": 5, - "column": 23 + "column": 21 }, "end": { "line": 5, - "column": 28 + "column": 26 } }, "left": { "type": "Identifier", - "start": 62, - "end": 63, + "start": 56, + "end": 57, "loc": { "start": { "line": 5, - "column": 23 + "column": 21 }, "end": { "line": 5, - "column": 24 + "column": 22 }, "identifierName": "y" }, @@ -305,16 +305,16 @@ }, "right": { "type": "NumericLiteral", - "start": 66, - "end": 67, + "start": 60, + "end": 61, "loc": { "start": { "line": 5, - "column": 27 + "column": 25 }, "end": { "line": 5, - "column": 28 + "column": 26 } }, "extra": { @@ -327,109 +327,140 @@ ], "body": { "type": "BlockStatement", - "start": 69, - "end": 568, + "start": 63, + "end": 527, "loc": { "start": { "line": 5, - "column": 30 + "column": 28 }, "end": { - "line": 29, - "column": 5 + "line": 28, + "column": 3 } }, "body": [ { "type": "ExpressionStatement", - "start": 79, - "end": 87, + "start": 69, + "end": 82, "loc": { "start": { "line": 6, - "column": 8 + "column": 4 }, "end": { "line": 6, - "column": 16 + "column": 17 } }, "expression": { "type": "AssignmentExpression", - "start": 79, - "end": 86, + "start": 69, + "end": 81, "loc": { "start": { "line": 6, - "column": 8 + "column": 4 }, "end": { "line": 6, - "column": 15 + "column": 16 } }, "operator": "=", "left": { - "type": "PrivateName", - "start": 80, + "type": "MemberExpression", + "start": 69, + "end": 76, + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 11 + } + }, + "object": { + "type": "ThisExpression", + "start": 69, + "end": 73, + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "property": { + "type": "PrivateName", + "start": 75, + "end": 76, + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 11 + } + }, + "name": { + "type": "Identifier", + "start": 75, + "end": 76, + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 11 + }, + "identifierName": "x" + }, + "name": "x" + } + }, + "computed": false + }, + "right": { + "type": "UnaryExpression", + "start": 79, "end": 81, "loc": { "start": { "line": 6, - "column": 9 + "column": 14 }, "end": { "line": 6, - "column": 10 + "column": 16 } }, - "name": { + "operator": "+", + "prefix": true, + "argument": { "type": "Identifier", "start": 80, "end": 81, "loc": { "start": { - "line": 6, - "column": 9 - }, - "end": { - "line": 6, - "column": 10 - }, - "identifierName": "x" - }, - "name": "x" - } - }, - "right": { - "type": "UnaryExpression", - "start": 84, - "end": 86, - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 15 - } - }, - "operator": "+", - "prefix": true, - "argument": { - "type": "Identifier", - "start": 85, - "end": 86, - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { "line": 6, "column": 15 }, + "end": { + "line": 6, + "column": 16 + }, "identifierName": "x" }, "name": "x" @@ -442,174 +473,205 @@ }, { "type": "ExpressionStatement", - "start": 96, - "end": 104, + "start": 87, + "end": 100, "loc": { "start": { "line": 7, - "column": 8 + "column": 4 }, "end": { "line": 7, - "column": 16 + "column": 17 } }, "expression": { "type": "AssignmentExpression", - "start": 96, - "end": 103, + "start": 87, + "end": 99, "loc": { "start": { "line": 7, - "column": 8 + "column": 4 }, "end": { "line": 7, - "column": 15 - } - }, - "operator": "=", - "left": { - "type": "PrivateName", - "start": 97, - "end": 98, - "loc": { - "start": { - "line": 7, - "column": 9 - }, - "end": { - "line": 7, - "column": 10 - } - }, - "name": { - "type": "Identifier", - "start": 97, - "end": 98, - "loc": { - "start": { - "line": 7, - "column": 9 - }, - "end": { - "line": 7, - "column": 10 - }, - "identifierName": "y" - }, - "name": "y" - } - }, - "right": { - "type": "UnaryExpression", - "start": 101, - "end": 103, - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 15 - } - }, - "operator": "+", - "prefix": true, - "argument": { - "type": "Identifier", - "start": 102, - "end": 103, - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 7, - "column": 15 - }, - "identifierName": "y" - }, - "name": "y" - }, - "extra": { - "parenthesizedArgument": false - } - } - } - }, - { - "type": "ExpressionStatement", - "start": 115, - "end": 562, - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 28, - "column": 10 - } - }, - "expression": { - "type": "AssignmentExpression", - "start": 115, - "end": 561, - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 28, - "column": 9 + "column": 16 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 115, - "end": 123, + "start": 87, + "end": 94, "loc": { "start": { - "line": 10, - "column": 8 + "line": 7, + "column": 4 }, "end": { - "line": 10, - "column": 16 + "line": 7, + "column": 11 } }, "object": { "type": "ThisExpression", - "start": 115, - "end": 119, + "start": 87, + "end": 91, "loc": { "start": { - "line": 10, - "column": 8 + "line": 7, + "column": 4 }, "end": { - "line": 10, - "column": 12 + "line": 7, + "column": 8 + } + } + }, + "property": { + "type": "PrivateName", + "start": 93, + "end": 94, + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 11 + } + }, + "name": { + "type": "Identifier", + "start": 93, + "end": 94, + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 11 + }, + "identifierName": "y" + }, + "name": "y" + } + }, + "computed": false + }, + "right": { + "type": "UnaryExpression", + "start": 97, + "end": 99, + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 16 + } + }, + "operator": "+", + "prefix": true, + "argument": { + "type": "Identifier", + "start": 98, + "end": 99, + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 16 + }, + "identifierName": "y" + }, + "name": "y" + }, + "extra": { + "parenthesizedArgument": false + } + } + } + }, + { + "type": "ExpressionStatement", + "start": 106, + "end": 523, + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 27, + "column": 6 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 106, + "end": 522, + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 27, + "column": 5 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 106, + "end": 114, + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 12 + } + }, + "object": { + "type": "ThisExpression", + "start": 106, + "end": 110, + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 8 } } }, "property": { "type": "Identifier", - "start": 120, - "end": 123, + "start": 111, + "end": 114, "loc": { "start": { - "line": 10, - "column": 13 + "line": 9, + "column": 9 }, "end": { - "line": 10, - "column": 16 + "line": 9, + "column": 12 }, "identifierName": "foo" }, @@ -619,61 +681,61 @@ }, "right": { "type": "ClassExpression", - "start": 126, - "end": 561, + "start": 117, + "end": 522, "loc": { "start": { - "line": 10, - "column": 19 + "line": 9, + "column": 15 }, "end": { - "line": 28, - "column": 9 + "line": 27, + "column": 5 } }, "id": null, "superClass": null, "body": { "type": "ClassBody", - "start": 132, - "end": 561, + "start": 123, + "end": 522, "loc": { "start": { - "line": 10, - "column": 25 + "line": 9, + "column": 21 }, "end": { - "line": 28, - "column": 9 + "line": 27, + "column": 5 } }, "body": [ { "type": "ClassPrivateProperty", - "start": 146, - "end": 153, + "start": 131, + "end": 138, "loc": { "start": { - "line": 11, - "column": 12 + "line": 10, + "column": 6 }, "end": { - "line": 11, - "column": 19 + "line": 10, + "column": 13 } }, "key": { "type": "Identifier", - "start": 147, - "end": 148, + "start": 132, + "end": 133, "loc": { "start": { - "line": 11, - "column": 13 + "line": 10, + "column": 7 }, "end": { - "line": 11, - "column": 14 + "line": 10, + "column": 8 }, "identifierName": "x" }, @@ -682,16 +744,16 @@ "static": false, "value": { "type": "NumericLiteral", - "start": 151, - "end": 152, + "start": 136, + "end": 137, "loc": { "start": { - "line": 11, - "column": 17 + "line": 10, + "column": 11 }, "end": { - "line": 11, - "column": 18 + "line": 10, + "column": 12 } }, "extra": { @@ -703,30 +765,30 @@ }, { "type": "ClassPrivateProperty", - "start": 166, - "end": 173, + "start": 145, + "end": 152, "loc": { "start": { - "line": 12, - "column": 12 + "line": 11, + "column": 6 }, "end": { - "line": 12, - "column": 19 + "line": 11, + "column": 13 } }, "key": { "type": "Identifier", - "start": 167, - "end": 168, + "start": 146, + "end": 147, "loc": { "start": { - "line": 12, - "column": 13 + "line": 11, + "column": 7 }, "end": { - "line": 12, - "column": 14 + "line": 11, + "column": 8 }, "identifierName": "y" }, @@ -735,16 +797,16 @@ "static": false, "value": { "type": "NumericLiteral", - "start": 171, - "end": 172, + "start": 150, + "end": 151, "loc": { "start": { - "line": 12, - "column": 17 + "line": 11, + "column": 11 }, "end": { - "line": 12, - "column": 18 + "line": 11, + "column": 12 } }, "extra": { @@ -756,32 +818,32 @@ }, { "type": "ClassMethod", - "start": 187, - "end": 278, + "start": 160, + "end": 239, "loc": { "start": { - "line": 14, - "column": 12 + "line": 13, + "column": 6 }, "end": { - "line": 17, - "column": 13 + "line": 16, + "column": 7 } }, "static": false, "computed": false, "key": { "type": "Identifier", - "start": 187, - "end": 198, + "start": 160, + "end": 171, "loc": { "start": { - "line": 14, - "column": 12 + "line": 13, + "column": 6 }, "end": { - "line": 14, - "column": 23 + "line": 13, + "column": 17 }, "identifierName": "constructor" }, @@ -795,30 +857,30 @@ "params": [ { "type": "AssignmentPattern", - "start": 199, - "end": 204, + "start": 172, + "end": 177, "loc": { "start": { - "line": 14, - "column": 24 + "line": 13, + "column": 18 }, "end": { - "line": 14, - "column": 29 + "line": 13, + "column": 23 } }, "left": { "type": "Identifier", - "start": 199, - "end": 200, + "start": 172, + "end": 173, "loc": { "start": { - "line": 14, - "column": 24 + "line": 13, + "column": 18 }, "end": { - "line": 14, - "column": 25 + "line": 13, + "column": 19 }, "identifierName": "x" }, @@ -826,16 +888,16 @@ }, "right": { "type": "NumericLiteral", - "start": 203, - "end": 204, + "start": 176, + "end": 177, "loc": { "start": { - "line": 14, - "column": 28 + "line": 13, + "column": 22 }, "end": { - "line": 14, - "column": 29 + "line": 13, + "column": 23 } }, "extra": { @@ -847,30 +909,30 @@ }, { "type": "AssignmentPattern", - "start": 206, - "end": 211, + "start": 179, + "end": 184, "loc": { "start": { - "line": 14, - "column": 31 + "line": 13, + "column": 25 }, "end": { - "line": 14, - "column": 36 + "line": 13, + "column": 30 } }, "left": { "type": "Identifier", - "start": 206, - "end": 207, + "start": 179, + "end": 180, "loc": { "start": { - "line": 14, - "column": 31 + "line": 13, + "column": 25 }, "end": { - "line": 14, - "column": 32 + "line": 13, + "column": 26 }, "identifierName": "y" }, @@ -878,16 +940,16 @@ }, "right": { "type": "NumericLiteral", - "start": 210, - "end": 211, + "start": 183, + "end": 184, "loc": { "start": { - "line": 14, - "column": 35 + "line": 13, + "column": 29 }, "end": { - "line": 14, - "column": 36 + "line": 13, + "column": 30 } }, "extra": { @@ -900,108 +962,139 @@ ], "body": { "type": "BlockStatement", - "start": 213, - "end": 278, + "start": 186, + "end": 239, "loc": { "start": { - "line": 14, - "column": 38 + "line": 13, + "column": 32 }, "end": { - "line": 17, - "column": 13 + "line": 16, + "column": 7 } }, "body": [ { "type": "ExpressionStatement", - "start": 231, - "end": 239, + "start": 196, + "end": 209, "loc": { "start": { - "line": 15, - "column": 16 + "line": 14, + "column": 8 }, "end": { - "line": 15, - "column": 24 + "line": 14, + "column": 21 } }, "expression": { "type": "AssignmentExpression", - "start": 231, - "end": 238, + "start": 196, + "end": 208, "loc": { "start": { - "line": 15, - "column": 16 + "line": 14, + "column": 8 }, "end": { - "line": 15, - "column": 23 + "line": 14, + "column": 20 } }, "operator": "=", "left": { - "type": "PrivateName", - "start": 232, - "end": 233, + "type": "MemberExpression", + "start": 196, + "end": 203, "loc": { "start": { - "line": 15, - "column": 17 + "line": 14, + "column": 8 }, "end": { - "line": 15, - "column": 18 + "line": 14, + "column": 15 } }, - "name": { - "type": "Identifier", - "start": 232, - "end": 233, + "object": { + "type": "ThisExpression", + "start": 196, + "end": 200, "loc": { "start": { - "line": 15, - "column": 17 + "line": 14, + "column": 8 }, "end": { - "line": 15, - "column": 18 + "line": 14, + "column": 12 + } + } + }, + "property": { + "type": "PrivateName", + "start": 202, + "end": 203, + "loc": { + "start": { + "line": 14, + "column": 14 }, - "identifierName": "x" + "end": { + "line": 14, + "column": 15 + } }, - "name": "x" - } + "name": { + "type": "Identifier", + "start": 202, + "end": 203, + "loc": { + "start": { + "line": 14, + "column": 14 + }, + "end": { + "line": 14, + "column": 15 + }, + "identifierName": "x" + }, + "name": "x" + } + }, + "computed": false }, "right": { "type": "UnaryExpression", - "start": 236, - "end": 238, + "start": 206, + "end": 208, "loc": { "start": { - "line": 15, - "column": 21 + "line": 14, + "column": 18 }, "end": { - "line": 15, - "column": 23 + "line": 14, + "column": 20 } }, "operator": "+", "prefix": true, "argument": { "type": "Identifier", - "start": 237, - "end": 238, + "start": 207, + "end": 208, "loc": { "start": { - "line": 15, - "column": 22 + "line": 14, + "column": 19 }, "end": { - "line": 15, - "column": 23 + "line": 14, + "column": 20 }, "identifierName": "x" }, @@ -1015,93 +1108,124 @@ }, { "type": "ExpressionStatement", - "start": 256, - "end": 264, + "start": 218, + "end": 231, "loc": { "start": { - "line": 16, - "column": 16 + "line": 15, + "column": 8 }, "end": { - "line": 16, - "column": 24 + "line": 15, + "column": 21 } }, "expression": { "type": "AssignmentExpression", - "start": 256, - "end": 263, + "start": 218, + "end": 230, "loc": { "start": { - "line": 16, - "column": 16 + "line": 15, + "column": 8 }, "end": { - "line": 16, - "column": 23 + "line": 15, + "column": 20 } }, "operator": "=", "left": { - "type": "PrivateName", - "start": 257, - "end": 258, + "type": "MemberExpression", + "start": 218, + "end": 225, "loc": { "start": { - "line": 16, - "column": 17 + "line": 15, + "column": 8 }, "end": { - "line": 16, - "column": 18 + "line": 15, + "column": 15 } }, - "name": { - "type": "Identifier", - "start": 257, - "end": 258, + "object": { + "type": "ThisExpression", + "start": 218, + "end": 222, "loc": { "start": { - "line": 16, - "column": 17 + "line": 15, + "column": 8 }, "end": { - "line": 16, - "column": 18 + "line": 15, + "column": 12 + } + } + }, + "property": { + "type": "PrivateName", + "start": 224, + "end": 225, + "loc": { + "start": { + "line": 15, + "column": 14 }, - "identifierName": "y" + "end": { + "line": 15, + "column": 15 + } }, - "name": "y" - } + "name": { + "type": "Identifier", + "start": 224, + "end": 225, + "loc": { + "start": { + "line": 15, + "column": 14 + }, + "end": { + "line": 15, + "column": 15 + }, + "identifierName": "y" + }, + "name": "y" + } + }, + "computed": false }, "right": { "type": "UnaryExpression", - "start": 261, - "end": 263, + "start": 228, + "end": 230, "loc": { "start": { - "line": 16, - "column": 21 + "line": 15, + "column": 18 }, "end": { - "line": 16, - "column": 23 + "line": 15, + "column": 20 } }, "operator": "+", "prefix": true, "argument": { "type": "Identifier", - "start": 262, - "end": 263, + "start": 229, + "end": 230, "loc": { "start": { - "line": 16, - "column": 22 + "line": 15, + "column": 19 }, "end": { - "line": 16, - "column": 23 + "line": 15, + "column": 20 }, "identifierName": "y" }, @@ -1119,137 +1243,168 @@ }, { "type": "ClassMethod", - "start": 292, + "start": 247, + "end": 273, + "loc": { + "start": { + "line": 18, + "column": 6 + }, + "end": { + "line": 18, + "column": 32 + } + }, + "static": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 251, + "end": 252, + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + }, + "identifierName": "x" + }, + "name": "x" + }, + "kind": "get", + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 255, + "end": 273, + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 32 + } + }, + "body": [ + { + "type": "ReturnStatement", + "start": 257, + "end": 271, + "loc": { + "start": { + "line": 18, + "column": 16 + }, + "end": { + "line": 18, + "column": 30 + } + }, + "argument": { + "type": "MemberExpression", + "start": 264, + "end": 271, + "loc": { + "start": { + "line": 18, + "column": 23 + }, + "end": { + "line": 18, + "column": 30 + } + }, + "object": { + "type": "ThisExpression", + "start": 264, + "end": 268, + "loc": { + "start": { + "line": 18, + "column": 23 + }, + "end": { + "line": 18, + "column": 27 + } + } + }, + "property": { + "type": "PrivateName", + "start": 270, + "end": 271, + "loc": { + "start": { + "line": 18, + "column": 29 + }, + "end": { + "line": 18, + "column": 30 + } + }, + "name": { + "type": "Identifier", + "start": 270, + "end": 271, + "loc": { + "start": { + "line": 18, + "column": 29 + }, + "end": { + "line": 18, + "column": 30 + }, + "identifierName": "x" + }, + "name": "x" + } + }, + "computed": false + } + } + ], + "directives": [] + } + }, + { + "type": "ClassMethod", + "start": 280, "end": 313, "loc": { "start": { "line": 19, - "column": 12 + "column": 6 }, "end": { "line": 19, - "column": 33 + "column": 39 } }, "static": false, "computed": false, "key": { "type": "Identifier", - "start": 296, - "end": 297, + "start": 284, + "end": 285, "loc": { "start": { "line": 19, - "column": 16 + "column": 10 }, "end": { "line": 19, - "column": 17 - }, - "identifierName": "x" - }, - "name": "x" - }, - "kind": "get", - "id": null, - "generator": false, - "expression": false, - "async": false, - "params": [], - "body": { - "type": "BlockStatement", - "start": 300, - "end": 313, - "loc": { - "start": { - "line": 19, - "column": 20 - }, - "end": { - "line": 19, - "column": 33 - } - }, - "body": [ - { - "type": "ReturnStatement", - "start": 302, - "end": 311, - "loc": { - "start": { - "line": 19, - "column": 22 - }, - "end": { - "line": 19, - "column": 31 - } - }, - "argument": { - "type": "PrivateName", - "start": 310, - "end": 311, - "loc": { - "start": { - "line": 19, - "column": 30 - }, - "end": { - "line": 19, - "column": 31 - } - }, - "name": { - "type": "Identifier", - "start": 310, - "end": 311, - "loc": { - "start": { - "line": 19, - "column": 30 - }, - "end": { - "line": 19, - "column": 31 - }, - "identifierName": "x" - }, - "name": "x" - } - } - } - ], - "directives": [] - } - }, - { - "type": "ClassMethod", - "start": 326, - "end": 354, - "loc": { - "start": { - "line": 20, - "column": 12 - }, - "end": { - "line": 20, - "column": 40 - } - }, - "static": false, - "computed": false, - "key": { - "type": "Identifier", - "start": 330, - "end": 331, - "loc": { - "start": { - "line": 20, - "column": 16 - }, - "end": { - "line": 20, - "column": 17 + "column": 11 }, "identifierName": "x" }, @@ -1263,16 +1418,16 @@ "params": [ { "type": "Identifier", - "start": 332, - "end": 337, + "start": 286, + "end": 291, "loc": { "start": { - "line": 20, - "column": 18 + "line": 19, + "column": 12 }, "end": { - "line": 20, - "column": 23 + "line": 19, + "column": 17 }, "identifierName": "value" }, @@ -1281,108 +1436,139 @@ ], "body": { "type": "BlockStatement", - "start": 339, - "end": 354, + "start": 293, + "end": 313, "loc": { "start": { - "line": 20, - "column": 25 + "line": 19, + "column": 19 }, "end": { - "line": 20, - "column": 40 + "line": 19, + "column": 39 } }, "body": [ { "type": "ExpressionStatement", - "start": 341, - "end": 352, + "start": 295, + "end": 311, "loc": { "start": { - "line": 20, - "column": 27 + "line": 19, + "column": 21 }, "end": { - "line": 20, - "column": 38 + "line": 19, + "column": 37 } }, "expression": { "type": "AssignmentExpression", - "start": 341, - "end": 352, + "start": 295, + "end": 311, "loc": { "start": { - "line": 20, - "column": 27 + "line": 19, + "column": 21 }, "end": { - "line": 20, - "column": 38 + "line": 19, + "column": 37 } }, "operator": "=", "left": { - "type": "PrivateName", - "start": 342, - "end": 343, + "type": "MemberExpression", + "start": 295, + "end": 302, "loc": { "start": { - "line": 20, - "column": 28 + "line": 19, + "column": 21 }, "end": { - "line": 20, - "column": 29 + "line": 19, + "column": 28 } }, - "name": { - "type": "Identifier", - "start": 342, - "end": 343, + "object": { + "type": "ThisExpression", + "start": 295, + "end": 299, "loc": { "start": { - "line": 20, - "column": 28 + "line": 19, + "column": 21 }, "end": { - "line": 20, - "column": 29 + "line": 19, + "column": 25 + } + } + }, + "property": { + "type": "PrivateName", + "start": 301, + "end": 302, + "loc": { + "start": { + "line": 19, + "column": 27 }, - "identifierName": "x" + "end": { + "line": 19, + "column": 28 + } }, - "name": "x" - } + "name": { + "type": "Identifier", + "start": 301, + "end": 302, + "loc": { + "start": { + "line": 19, + "column": 27 + }, + "end": { + "line": 19, + "column": 28 + }, + "identifierName": "x" + }, + "name": "x" + } + }, + "computed": false }, "right": { "type": "UnaryExpression", - "start": 346, - "end": 352, + "start": 305, + "end": 311, "loc": { "start": { - "line": 20, - "column": 32 + "line": 19, + "column": 31 }, "end": { - "line": 20, - "column": 38 + "line": 19, + "column": 37 } }, "operator": "+", "prefix": true, "argument": { "type": "Identifier", - "start": 347, - "end": 352, + "start": 306, + "end": 311, "loc": { "start": { - "line": 20, - "column": 33 + "line": 19, + "column": 32 }, "end": { - "line": 20, - "column": 38 + "line": 19, + "column": 37 }, "identifierName": "value" }, @@ -1400,32 +1586,32 @@ }, { "type": "ClassMethod", - "start": 368, - "end": 389, + "start": 321, + "end": 347, "loc": { "start": { - "line": 22, - "column": 12 + "line": 21, + "column": 6 }, "end": { - "line": 22, - "column": 33 + "line": 21, + "column": 32 } }, "static": false, "computed": false, "key": { "type": "Identifier", - "start": 372, - "end": 373, + "start": 325, + "end": 326, "loc": { "start": { - "line": 22, - "column": 16 + "line": 21, + "column": 10 }, "end": { - "line": 22, - "column": 17 + "line": 21, + "column": 11 }, "identifierName": "y" }, @@ -1439,231 +1625,293 @@ "params": [], "body": { "type": "BlockStatement", - "start": 376, - "end": 389, + "start": 329, + "end": 347, "loc": { "start": { - "line": 22, - "column": 20 + "line": 21, + "column": 14 }, "end": { - "line": 22, - "column": 33 + "line": 21, + "column": 32 } }, "body": [ { "type": "ReturnStatement", - "start": 378, - "end": 387, + "start": 331, + "end": 345, "loc": { "start": { - "line": 22, - "column": 22 + "line": 21, + "column": 16 }, "end": { - "line": 22, - "column": 31 + "line": 21, + "column": 30 } }, "argument": { - "type": "PrivateName", - "start": 386, - "end": 387, + "type": "MemberExpression", + "start": 338, + "end": 345, "loc": { "start": { - "line": 22, + "line": 21, + "column": 23 + }, + "end": { + "line": 21, "column": 30 - }, - "end": { - "line": 22, - "column": 31 } }, - "name": { - "type": "Identifier", - "start": 386, - "end": 387, + "object": { + "type": "ThisExpression", + "start": 338, + "end": 342, "loc": { "start": { - "line": 22, - "column": 30 + "line": 21, + "column": 23 }, "end": { - "line": 22, - "column": 31 - }, - "identifierName": "y" - }, - "name": "y" - } - } - } - ], - "directives": [] - } - }, - { - "type": "ClassMethod", - "start": 402, - "end": 430, - "loc": { - "start": { - "line": 23, - "column": 12 - }, - "end": { - "line": 23, - "column": 40 - } - }, - "static": false, - "computed": false, - "key": { - "type": "Identifier", - "start": 406, - "end": 407, - "loc": { - "start": { - "line": 23, - "column": 16 - }, - "end": { - "line": 23, - "column": 17 - }, - "identifierName": "y" - }, - "name": "y" - }, - "kind": "set", - "id": null, - "generator": false, - "expression": false, - "async": false, - "params": [ - { - "type": "Identifier", - "start": 408, - "end": 413, - "loc": { - "start": { - "line": 23, - "column": 18 - }, - "end": { - "line": 23, - "column": 23 - }, - "identifierName": "value" - }, - "name": "value" - } - ], - "body": { - "type": "BlockStatement", - "start": 415, - "end": 430, - "loc": { - "start": { - "line": 23, - "column": 25 - }, - "end": { - "line": 23, - "column": 40 - } - }, - "body": [ - { - "type": "ExpressionStatement", - "start": 417, - "end": 428, - "loc": { - "start": { - "line": 23, - "column": 27 - }, - "end": { - "line": 23, - "column": 38 - } - }, - "expression": { - "type": "AssignmentExpression", - "start": 417, - "end": 428, - "loc": { - "start": { - "line": 23, - "column": 27 - }, - "end": { - "line": 23, - "column": 38 + "line": 21, + "column": 27 + } } }, - "operator": "=", - "left": { + "property": { "type": "PrivateName", - "start": 418, - "end": 419, + "start": 344, + "end": 345, "loc": { "start": { - "line": 23, - "column": 28 + "line": 21, + "column": 29 }, "end": { - "line": 23, - "column": 29 + "line": 21, + "column": 30 } }, "name": { "type": "Identifier", - "start": 418, - "end": 419, + "start": 344, + "end": 345, "loc": { "start": { - "line": 23, - "column": 28 + "line": 21, + "column": 29 }, "end": { - "line": 23, - "column": 29 + "line": 21, + "column": 30 }, "identifierName": "y" }, "name": "y" } }, - "right": { - "type": "UnaryExpression", - "start": 422, - "end": 428, + "computed": false + } + } + ], + "directives": [] + } + }, + { + "type": "ClassMethod", + "start": 354, + "end": 387, + "loc": { + "start": { + "line": 22, + "column": 6 + }, + "end": { + "line": 22, + "column": 39 + } + }, + "static": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 358, + "end": 359, + "loc": { + "start": { + "line": 22, + "column": 10 + }, + "end": { + "line": 22, + "column": 11 + }, + "identifierName": "y" + }, + "name": "y" + }, + "kind": "set", + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 360, + "end": 365, + "loc": { + "start": { + "line": 22, + "column": 12 + }, + "end": { + "line": 22, + "column": 17 + }, + "identifierName": "value" + }, + "name": "value" + } + ], + "body": { + "type": "BlockStatement", + "start": 367, + "end": 387, + "loc": { + "start": { + "line": 22, + "column": 19 + }, + "end": { + "line": 22, + "column": 39 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 369, + "end": 385, + "loc": { + "start": { + "line": 22, + "column": 21 + }, + "end": { + "line": 22, + "column": 37 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 369, + "end": 385, + "loc": { + "start": { + "line": 22, + "column": 21 + }, + "end": { + "line": 22, + "column": 37 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 369, + "end": 376, "loc": { "start": { - "line": 23, - "column": 32 + "line": 22, + "column": 21 }, "end": { - "line": 23, - "column": 38 + "line": 22, + "column": 28 + } + }, + "object": { + "type": "ThisExpression", + "start": 369, + "end": 373, + "loc": { + "start": { + "line": 22, + "column": 21 + }, + "end": { + "line": 22, + "column": 25 + } + } + }, + "property": { + "type": "PrivateName", + "start": 375, + "end": 376, + "loc": { + "start": { + "line": 22, + "column": 27 + }, + "end": { + "line": 22, + "column": 28 + } + }, + "name": { + "type": "Identifier", + "start": 375, + "end": 376, + "loc": { + "start": { + "line": 22, + "column": 27 + }, + "end": { + "line": 22, + "column": 28 + }, + "identifierName": "y" + }, + "name": "y" + } + }, + "computed": false + }, + "right": { + "type": "UnaryExpression", + "start": 379, + "end": 385, + "loc": { + "start": { + "line": 22, + "column": 31 + }, + "end": { + "line": 22, + "column": 37 } }, "operator": "+", "prefix": true, "argument": { "type": "Identifier", - "start": 423, - "end": 428, + "start": 380, + "end": 385, "loc": { "start": { - "line": 23, - "column": 33 + "line": 22, + "column": 32 }, "end": { - "line": 23, - "column": 38 + "line": 22, + "column": 37 }, "identifierName": "value" }, @@ -1681,32 +1929,32 @@ }, { "type": "ClassMethod", - "start": 444, - "end": 491, + "start": 395, + "end": 452, "loc": { "start": { - "line": 25, - "column": 12 + "line": 24, + "column": 6 }, "end": { - "line": 25, - "column": 59 + "line": 24, + "column": 63 } }, "static": false, "computed": false, "key": { "type": "Identifier", - "start": 444, - "end": 450, + "start": 395, + "end": 401, "loc": { "start": { - "line": 25, - "column": 12 + "line": 24, + "column": 6 }, "end": { - "line": 25, - "column": 18 + "line": 24, + "column": 12 }, "identifierName": "equals" }, @@ -1720,16 +1968,16 @@ "params": [ { "type": "Identifier", - "start": 451, - "end": 452, + "start": 402, + "end": 403, "loc": { "start": { - "line": 25, - "column": 19 + "line": 24, + "column": 13 }, "end": { - "line": 25, - "column": 20 + "line": 24, + "column": 14 }, "identifierName": "p" }, @@ -1738,120 +1986,151 @@ ], "body": { "type": "BlockStatement", - "start": 454, - "end": 491, + "start": 405, + "end": 452, "loc": { "start": { - "line": 25, - "column": 22 + "line": 24, + "column": 16 }, "end": { - "line": 25, - "column": 59 + "line": 24, + "column": 63 } }, "body": [ { "type": "ReturnStatement", - "start": 456, - "end": 489, + "start": 407, + "end": 450, "loc": { "start": { - "line": 25, - "column": 24 + "line": 24, + "column": 18 }, "end": { - "line": 25, - "column": 57 + "line": 24, + "column": 61 } }, "argument": { "type": "LogicalExpression", - "start": 463, - "end": 489, + "start": 414, + "end": 450, "loc": { "start": { - "line": 25, - "column": 31 + "line": 24, + "column": 25 }, "end": { - "line": 25, - "column": 57 + "line": 24, + "column": 61 } }, "left": { "type": "BinaryExpression", - "start": 463, - "end": 474, + "start": 414, + "end": 430, "loc": { "start": { - "line": 25, - "column": 31 + "line": 24, + "column": 25 }, "end": { - "line": 25, - "column": 42 + "line": 24, + "column": 41 } }, "left": { - "type": "PrivateName", - "start": 464, - "end": 465, + "type": "MemberExpression", + "start": 414, + "end": 421, "loc": { "start": { - "line": 25, - "column": 32 + "line": 24, + "column": 25 }, "end": { - "line": 25, - "column": 33 + "line": 24, + "column": 32 } }, - "name": { - "type": "Identifier", - "start": 464, - "end": 465, + "object": { + "type": "ThisExpression", + "start": 414, + "end": 418, "loc": { "start": { - "line": 25, - "column": 32 + "line": 24, + "column": 25 }, "end": { - "line": 25, - "column": 33 + "line": 24, + "column": 29 + } + } + }, + "property": { + "type": "PrivateName", + "start": 420, + "end": 421, + "loc": { + "start": { + "line": 24, + "column": 31 }, - "identifierName": "x" + "end": { + "line": 24, + "column": 32 + } }, - "name": "x" - } + "name": { + "type": "Identifier", + "start": 420, + "end": 421, + "loc": { + "start": { + "line": 24, + "column": 31 + }, + "end": { + "line": 24, + "column": 32 + }, + "identifierName": "x" + }, + "name": "x" + } + }, + "computed": false }, "operator": "===", "right": { "type": "MemberExpression", - "start": 470, - "end": 474, + "start": 426, + "end": 430, "loc": { "start": { - "line": 25, - "column": 38 + "line": 24, + "column": 37 }, "end": { - "line": 25, - "column": 42 + "line": 24, + "column": 41 } }, "object": { "type": "Identifier", - "start": 470, - "end": 471, + "start": 426, + "end": 427, "loc": { "start": { - "line": 25, - "column": 38 + "line": 24, + "column": 37 }, "end": { - "line": 25, - "column": 39 + "line": 24, + "column": 38 }, "identifierName": "p" }, @@ -1859,30 +2138,30 @@ }, "property": { "type": "PrivateName", - "start": 473, - "end": 474, + "start": 429, + "end": 430, "loc": { "start": { - "line": 25, - "column": 41 + "line": 24, + "column": 40 }, "end": { - "line": 25, - "column": 42 + "line": 24, + "column": 41 } }, "name": { "type": "Identifier", - "start": 473, - "end": 474, + "start": 429, + "end": 430, "loc": { "start": { - "line": 25, - "column": 41 + "line": 24, + "column": 40 }, "end": { - "line": 25, - "column": 42 + "line": 24, + "column": 41 }, "identifierName": "x" }, @@ -1895,77 +2174,108 @@ "operator": "&&", "right": { "type": "BinaryExpression", - "start": 478, - "end": 489, + "start": 434, + "end": 450, "loc": { "start": { - "line": 25, - "column": 46 + "line": 24, + "column": 45 }, "end": { - "line": 25, - "column": 57 + "line": 24, + "column": 61 } }, "left": { - "type": "PrivateName", - "start": 479, - "end": 480, + "type": "MemberExpression", + "start": 434, + "end": 441, "loc": { "start": { - "line": 25, - "column": 47 + "line": 24, + "column": 45 }, "end": { - "line": 25, - "column": 48 + "line": 24, + "column": 52 } }, - "name": { - "type": "Identifier", - "start": 479, - "end": 480, + "object": { + "type": "ThisExpression", + "start": 434, + "end": 438, "loc": { "start": { - "line": 25, - "column": 47 + "line": 24, + "column": 45 }, "end": { - "line": 25, - "column": 48 + "line": 24, + "column": 49 + } + } + }, + "property": { + "type": "PrivateName", + "start": 440, + "end": 441, + "loc": { + "start": { + "line": 24, + "column": 51 }, - "identifierName": "y" + "end": { + "line": 24, + "column": 52 + } }, - "name": "y" - } + "name": { + "type": "Identifier", + "start": 440, + "end": 441, + "loc": { + "start": { + "line": 24, + "column": 51 + }, + "end": { + "line": 24, + "column": 52 + }, + "identifierName": "y" + }, + "name": "y" + } + }, + "computed": false }, "operator": "===", "right": { "type": "MemberExpression", - "start": 485, - "end": 489, + "start": 446, + "end": 450, "loc": { "start": { - "line": 25, - "column": 53 + "line": 24, + "column": 57 }, "end": { - "line": 25, - "column": 57 + "line": 24, + "column": 61 } }, "object": { "type": "Identifier", - "start": 485, - "end": 486, + "start": 446, + "end": 447, "loc": { "start": { - "line": 25, - "column": 53 + "line": 24, + "column": 57 }, "end": { - "line": 25, - "column": 54 + "line": 24, + "column": 58 }, "identifierName": "p" }, @@ -1973,30 +2283,30 @@ }, "property": { "type": "PrivateName", - "start": 488, - "end": 489, + "start": 449, + "end": 450, "loc": { "start": { - "line": 25, - "column": 56 + "line": 24, + "column": 60 }, "end": { - "line": 25, - "column": 57 + "line": 24, + "column": 61 } }, "name": { "type": "Identifier", - "start": 488, - "end": 489, + "start": 449, + "end": 450, "loc": { "start": { - "line": 25, - "column": 56 + "line": 24, + "column": 60 }, "end": { - "line": 25, - "column": 57 + "line": 24, + "column": 61 }, "identifierName": "y" }, @@ -2014,32 +2324,32 @@ }, { "type": "ClassMethod", - "start": 505, - "end": 551, + "start": 460, + "end": 516, "loc": { "start": { - "line": 27, - "column": 12 + "line": 26, + "column": 6 }, "end": { - "line": 27, - "column": 58 + "line": 26, + "column": 62 } }, "static": false, "computed": false, "key": { "type": "Identifier", - "start": 505, - "end": 513, + "start": 460, + "end": 468, "loc": { "start": { - "line": 27, - "column": 12 + "line": 26, + "column": 6 }, "end": { - "line": 27, - "column": 20 + "line": 26, + "column": 14 }, "identifierName": "toString" }, @@ -2053,126 +2363,188 @@ "params": [], "body": { "type": "BlockStatement", - "start": 516, - "end": 551, + "start": 471, + "end": 516, "loc": { "start": { - "line": 27, - "column": 23 + "line": 26, + "column": 17 }, "end": { - "line": 27, - "column": 58 + "line": 26, + "column": 62 } }, "body": [ { "type": "ReturnStatement", - "start": 518, - "end": 549, + "start": 473, + "end": 514, "loc": { "start": { - "line": 27, - "column": 25 + "line": 26, + "column": 19 }, "end": { - "line": 27, - "column": 56 + "line": 26, + "column": 60 } }, "argument": { "type": "TemplateLiteral", - "start": 525, - "end": 549, + "start": 480, + "end": 514, "loc": { "start": { - "line": 27, - "column": 32 + "line": 26, + "column": 26 }, "end": { - "line": 27, - "column": 56 + "line": 26, + "column": 60 } }, "expressions": [ { - "type": "PrivateName", - "start": 536, - "end": 537, + "type": "MemberExpression", + "start": 490, + "end": 497, "loc": { "start": { - "line": 27, - "column": 43 + "line": 26, + "column": 36 }, "end": { - "line": 27, - "column": 44 + "line": 26, + "column": 43 } }, - "name": { - "type": "Identifier", - "start": 536, - "end": 537, + "object": { + "type": "ThisExpression", + "start": 490, + "end": 494, "loc": { "start": { - "line": 27, - "column": 43 + "line": 26, + "column": 36 }, "end": { - "line": 27, - "column": 44 + "line": 26, + "column": 40 + } + } + }, + "property": { + "type": "PrivateName", + "start": 496, + "end": 497, + "loc": { + "start": { + "line": 26, + "column": 42 }, - "identifierName": "x" + "end": { + "line": 26, + "column": 43 + } }, - "name": "x" - } + "name": { + "type": "Identifier", + "start": 496, + "end": 497, + "loc": { + "start": { + "line": 26, + "column": 42 + }, + "end": { + "line": 26, + "column": 43 + }, + "identifierName": "x" + }, + "name": "x" + } + }, + "computed": false }, { - "type": "PrivateName", - "start": 544, - "end": 545, + "type": "MemberExpression", + "start": 503, + "end": 510, "loc": { "start": { - "line": 27, - "column": 51 + "line": 26, + "column": 49 }, "end": { - "line": 27, - "column": 52 + "line": 26, + "column": 56 } }, - "name": { - "type": "Identifier", - "start": 544, - "end": 545, + "object": { + "type": "ThisExpression", + "start": 503, + "end": 507, "loc": { "start": { - "line": 27, - "column": 51 + "line": 26, + "column": 49 }, "end": { - "line": 27, - "column": 52 + "line": 26, + "column": 53 + } + } + }, + "property": { + "type": "PrivateName", + "start": 509, + "end": 510, + "loc": { + "start": { + "line": 26, + "column": 55 }, - "identifierName": "y" + "end": { + "line": 26, + "column": 56 + } }, - "name": "y" - } + "name": { + "type": "Identifier", + "start": 509, + "end": 510, + "loc": { + "start": { + "line": 26, + "column": 55 + }, + "end": { + "line": 26, + "column": 56 + }, + "identifierName": "y" + }, + "name": "y" + } + }, + "computed": false } ], "quasis": [ { "type": "TemplateElement", - "start": 526, - "end": 532, + "start": 481, + "end": 487, "loc": { "start": { - "line": 27, - "column": 33 + "line": 26, + "column": 27 }, "end": { - "line": 27, - "column": 39 + "line": 26, + "column": 33 } }, "value": { @@ -2183,16 +2555,16 @@ }, { "type": "TemplateElement", - "start": 539, - "end": 540, + "start": 499, + "end": 500, "loc": { "start": { - "line": 27, - "column": 46 + "line": 26, + "column": 45 }, "end": { - "line": 27, - "column": 47 + "line": 26, + "column": 46 } }, "value": { @@ -2203,16 +2575,16 @@ }, { "type": "TemplateElement", - "start": 547, - "end": 548, + "start": 512, + "end": 513, "loc": { "start": { - "line": 27, - "column": 54 + "line": 26, + "column": 58 }, "end": { - "line": 27, - "column": 55 + "line": 26, + "column": 59 } }, "value": { @@ -2239,32 +2611,32 @@ }, { "type": "ClassMethod", - "start": 574, - "end": 595, + "start": 531, + "end": 557, "loc": { "start": { - "line": 31, - "column": 4 + "line": 30, + "column": 2 }, "end": { - "line": 31, - "column": 25 + "line": 30, + "column": 28 } }, "static": false, "computed": false, "key": { "type": "Identifier", - "start": 578, - "end": 579, + "start": 535, + "end": 536, "loc": { "start": { - "line": 31, - "column": 8 + "line": 30, + "column": 6 }, "end": { - "line": 31, - "column": 9 + "line": 30, + "column": 7 }, "identifierName": "x" }, @@ -2278,231 +2650,293 @@ "params": [], "body": { "type": "BlockStatement", - "start": 582, - "end": 595, + "start": 539, + "end": 557, "loc": { "start": { - "line": 31, - "column": 12 + "line": 30, + "column": 10 }, "end": { - "line": 31, - "column": 25 + "line": 30, + "column": 28 } }, "body": [ { "type": "ReturnStatement", - "start": 584, - "end": 593, + "start": 541, + "end": 555, "loc": { "start": { - "line": 31, - "column": 14 + "line": 30, + "column": 12 }, "end": { - "line": 31, - "column": 23 + "line": 30, + "column": 26 } }, "argument": { - "type": "PrivateName", - "start": 592, - "end": 593, + "type": "MemberExpression", + "start": 548, + "end": 555, "loc": { "start": { - "line": 31, - "column": 22 - }, - "end": { - "line": 31, - "column": 23 - } - }, - "name": { - "type": "Identifier", - "start": 592, - "end": 593, - "loc": { - "start": { - "line": 31, - "column": 22 - }, - "end": { - "line": 31, - "column": 23 - }, - "identifierName": "x" - }, - "name": "x" - } - } - } - ], - "directives": [] - } - }, - { - "type": "ClassMethod", - "start": 600, - "end": 628, - "loc": { - "start": { - "line": 32, - "column": 4 - }, - "end": { - "line": 32, - "column": 32 - } - }, - "static": false, - "computed": false, - "key": { - "type": "Identifier", - "start": 604, - "end": 605, - "loc": { - "start": { - "line": 32, - "column": 8 - }, - "end": { - "line": 32, - "column": 9 - }, - "identifierName": "x" - }, - "name": "x" - }, - "kind": "set", - "id": null, - "generator": false, - "expression": false, - "async": false, - "params": [ - { - "type": "Identifier", - "start": 606, - "end": 611, - "loc": { - "start": { - "line": 32, - "column": 10 - }, - "end": { - "line": 32, - "column": 15 - }, - "identifierName": "value" - }, - "name": "value" - } - ], - "body": { - "type": "BlockStatement", - "start": 613, - "end": 628, - "loc": { - "start": { - "line": 32, - "column": 17 - }, - "end": { - "line": 32, - "column": 32 - } - }, - "body": [ - { - "type": "ExpressionStatement", - "start": 615, - "end": 626, - "loc": { - "start": { - "line": 32, - "column": 19 - }, - "end": { - "line": 32, - "column": 30 - } - }, - "expression": { - "type": "AssignmentExpression", - "start": 615, - "end": 626, - "loc": { - "start": { - "line": 32, + "line": 30, "column": 19 }, "end": { - "line": 32, - "column": 30 + "line": 30, + "column": 26 } }, - "operator": "=", - "left": { - "type": "PrivateName", - "start": 616, - "end": 617, + "object": { + "type": "ThisExpression", + "start": 548, + "end": 552, "loc": { "start": { - "line": 32, - "column": 20 + "line": 30, + "column": 19 }, "end": { - "line": 32, - "column": 21 + "line": 30, + "column": 23 + } + } + }, + "property": { + "type": "PrivateName", + "start": 554, + "end": 555, + "loc": { + "start": { + "line": 30, + "column": 25 + }, + "end": { + "line": 30, + "column": 26 } }, "name": { "type": "Identifier", - "start": 616, - "end": 617, + "start": 554, + "end": 555, "loc": { "start": { - "line": 32, - "column": 20 + "line": 30, + "column": 25 }, "end": { - "line": 32, - "column": 21 + "line": 30, + "column": 26 }, "identifierName": "x" }, "name": "x" } }, - "right": { - "type": "UnaryExpression", - "start": 620, - "end": 626, + "computed": false + } + } + ], + "directives": [] + } + }, + { + "type": "ClassMethod", + "start": 560, + "end": 593, + "loc": { + "start": { + "line": 31, + "column": 2 + }, + "end": { + "line": 31, + "column": 35 + } + }, + "static": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 564, + "end": 565, + "loc": { + "start": { + "line": 31, + "column": 6 + }, + "end": { + "line": 31, + "column": 7 + }, + "identifierName": "x" + }, + "name": "x" + }, + "kind": "set", + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 566, + "end": 571, + "loc": { + "start": { + "line": 31, + "column": 8 + }, + "end": { + "line": 31, + "column": 13 + }, + "identifierName": "value" + }, + "name": "value" + } + ], + "body": { + "type": "BlockStatement", + "start": 573, + "end": 593, + "loc": { + "start": { + "line": 31, + "column": 15 + }, + "end": { + "line": 31, + "column": 35 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 575, + "end": 591, + "loc": { + "start": { + "line": 31, + "column": 17 + }, + "end": { + "line": 31, + "column": 33 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 575, + "end": 591, + "loc": { + "start": { + "line": 31, + "column": 17 + }, + "end": { + "line": 31, + "column": 33 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 575, + "end": 582, "loc": { "start": { - "line": 32, - "column": 24 + "line": 31, + "column": 17 }, "end": { - "line": 32, - "column": 30 + "line": 31, + "column": 24 + } + }, + "object": { + "type": "ThisExpression", + "start": 575, + "end": 579, + "loc": { + "start": { + "line": 31, + "column": 17 + }, + "end": { + "line": 31, + "column": 21 + } + } + }, + "property": { + "type": "PrivateName", + "start": 581, + "end": 582, + "loc": { + "start": { + "line": 31, + "column": 23 + }, + "end": { + "line": 31, + "column": 24 + } + }, + "name": { + "type": "Identifier", + "start": 581, + "end": 582, + "loc": { + "start": { + "line": 31, + "column": 23 + }, + "end": { + "line": 31, + "column": 24 + }, + "identifierName": "x" + }, + "name": "x" + } + }, + "computed": false + }, + "right": { + "type": "UnaryExpression", + "start": 585, + "end": 591, + "loc": { + "start": { + "line": 31, + "column": 27 + }, + "end": { + "line": 31, + "column": 33 } }, "operator": "+", "prefix": true, "argument": { "type": "Identifier", - "start": 621, - "end": 626, + "start": 586, + "end": 591, "loc": { "start": { - "line": 32, - "column": 25 + "line": 31, + "column": 28 }, "end": { - "line": 32, - "column": 30 + "line": 31, + "column": 33 }, "identifierName": "value" }, @@ -2520,32 +2954,32 @@ }, { "type": "ClassMethod", - "start": 634, - "end": 655, + "start": 597, + "end": 623, "loc": { "start": { - "line": 34, - "column": 4 + "line": 33, + "column": 2 }, "end": { - "line": 34, - "column": 25 + "line": 33, + "column": 28 } }, "static": false, "computed": false, "key": { "type": "Identifier", - "start": 638, - "end": 639, + "start": 601, + "end": 602, "loc": { "start": { - "line": 34, - "column": 8 + "line": 33, + "column": 6 }, "end": { - "line": 34, - "column": 9 + "line": 33, + "column": 7 }, "identifierName": "y" }, @@ -2559,64 +2993,95 @@ "params": [], "body": { "type": "BlockStatement", - "start": 642, - "end": 655, + "start": 605, + "end": 623, "loc": { "start": { - "line": 34, - "column": 12 + "line": 33, + "column": 10 }, "end": { - "line": 34, - "column": 25 + "line": 33, + "column": 28 } }, "body": [ { "type": "ReturnStatement", - "start": 644, - "end": 653, + "start": 607, + "end": 621, "loc": { "start": { - "line": 34, - "column": 14 + "line": 33, + "column": 12 }, "end": { - "line": 34, - "column": 23 + "line": 33, + "column": 26 } }, "argument": { - "type": "PrivateName", - "start": 652, - "end": 653, + "type": "MemberExpression", + "start": 614, + "end": 621, "loc": { "start": { - "line": 34, - "column": 22 + "line": 33, + "column": 19 }, "end": { - "line": 34, - "column": 23 + "line": 33, + "column": 26 } }, - "name": { - "type": "Identifier", - "start": 652, - "end": 653, + "object": { + "type": "ThisExpression", + "start": 614, + "end": 618, "loc": { "start": { - "line": 34, - "column": 22 + "line": 33, + "column": 19 }, "end": { - "line": 34, + "line": 33, "column": 23 + } + } + }, + "property": { + "type": "PrivateName", + "start": 620, + "end": 621, + "loc": { + "start": { + "line": 33, + "column": 25 }, - "identifierName": "y" + "end": { + "line": 33, + "column": 26 + } }, - "name": "y" - } + "name": { + "type": "Identifier", + "start": 620, + "end": 621, + "loc": { + "start": { + "line": 33, + "column": 25 + }, + "end": { + "line": 33, + "column": 26 + }, + "identifierName": "y" + }, + "name": "y" + } + }, + "computed": false } } ], @@ -2625,32 +3090,32 @@ }, { "type": "ClassMethod", - "start": 660, - "end": 688, + "start": 626, + "end": 659, "loc": { "start": { - "line": 35, - "column": 4 + "line": 34, + "column": 2 }, "end": { - "line": 35, - "column": 32 + "line": 34, + "column": 35 } }, "static": false, "computed": false, "key": { "type": "Identifier", - "start": 664, - "end": 665, + "start": 630, + "end": 631, "loc": { "start": { - "line": 35, - "column": 8 + "line": 34, + "column": 6 }, "end": { - "line": 35, - "column": 9 + "line": 34, + "column": 7 }, "identifierName": "y" }, @@ -2664,16 +3129,16 @@ "params": [ { "type": "Identifier", - "start": 666, - "end": 671, + "start": 632, + "end": 637, "loc": { "start": { - "line": 35, - "column": 10 + "line": 34, + "column": 8 }, "end": { - "line": 35, - "column": 15 + "line": 34, + "column": 13 }, "identifierName": "value" }, @@ -2682,108 +3147,139 @@ ], "body": { "type": "BlockStatement", - "start": 673, - "end": 688, + "start": 639, + "end": 659, "loc": { "start": { - "line": 35, - "column": 17 + "line": 34, + "column": 15 }, "end": { - "line": 35, - "column": 32 + "line": 34, + "column": 35 } }, "body": [ { "type": "ExpressionStatement", - "start": 675, - "end": 686, + "start": 641, + "end": 657, "loc": { "start": { - "line": 35, - "column": 19 + "line": 34, + "column": 17 }, "end": { - "line": 35, - "column": 30 + "line": 34, + "column": 33 } }, "expression": { "type": "AssignmentExpression", - "start": 675, - "end": 686, + "start": 641, + "end": 657, "loc": { "start": { - "line": 35, - "column": 19 + "line": 34, + "column": 17 }, "end": { - "line": 35, - "column": 30 + "line": 34, + "column": 33 } }, "operator": "=", "left": { - "type": "PrivateName", - "start": 676, - "end": 677, + "type": "MemberExpression", + "start": 641, + "end": 648, "loc": { "start": { - "line": 35, - "column": 20 + "line": 34, + "column": 17 }, "end": { - "line": 35, - "column": 21 + "line": 34, + "column": 24 } }, - "name": { - "type": "Identifier", - "start": 676, - "end": 677, + "object": { + "type": "ThisExpression", + "start": 641, + "end": 645, "loc": { "start": { - "line": 35, - "column": 20 + "line": 34, + "column": 17 }, "end": { - "line": 35, + "line": 34, "column": 21 + } + } + }, + "property": { + "type": "PrivateName", + "start": 647, + "end": 648, + "loc": { + "start": { + "line": 34, + "column": 23 }, - "identifierName": "y" + "end": { + "line": 34, + "column": 24 + } }, - "name": "y" - } + "name": { + "type": "Identifier", + "start": 647, + "end": 648, + "loc": { + "start": { + "line": 34, + "column": 23 + }, + "end": { + "line": 34, + "column": 24 + }, + "identifierName": "y" + }, + "name": "y" + } + }, + "computed": false }, "right": { "type": "UnaryExpression", - "start": 680, - "end": 686, + "start": 651, + "end": 657, "loc": { "start": { - "line": 35, - "column": 24 + "line": 34, + "column": 27 }, "end": { - "line": 35, - "column": 30 + "line": 34, + "column": 33 } }, "operator": "+", "prefix": true, "argument": { "type": "Identifier", - "start": 681, - "end": 686, + "start": 652, + "end": 657, "loc": { "start": { - "line": 35, - "column": 25 + "line": 34, + "column": 28 }, "end": { - "line": 35, - "column": 30 + "line": 34, + "column": 33 }, "identifierName": "value" }, @@ -2801,32 +3297,32 @@ }, { "type": "ClassMethod", - "start": 694, - "end": 741, + "start": 663, + "end": 720, "loc": { "start": { - "line": 37, - "column": 4 + "line": 36, + "column": 2 }, "end": { - "line": 37, - "column": 51 + "line": 36, + "column": 59 } }, "static": false, "computed": false, "key": { "type": "Identifier", - "start": 694, - "end": 700, + "start": 663, + "end": 669, "loc": { "start": { - "line": 37, - "column": 4 + "line": 36, + "column": 2 }, "end": { - "line": 37, - "column": 10 + "line": 36, + "column": 8 }, "identifierName": "equals" }, @@ -2840,16 +3336,16 @@ "params": [ { "type": "Identifier", - "start": 701, - "end": 702, + "start": 670, + "end": 671, "loc": { "start": { - "line": 37, - "column": 11 + "line": 36, + "column": 9 }, "end": { - "line": 37, - "column": 12 + "line": 36, + "column": 10 }, "identifierName": "p" }, @@ -2858,120 +3354,151 @@ ], "body": { "type": "BlockStatement", - "start": 704, - "end": 741, + "start": 673, + "end": 720, "loc": { "start": { - "line": 37, - "column": 14 + "line": 36, + "column": 12 }, "end": { - "line": 37, - "column": 51 + "line": 36, + "column": 59 } }, "body": [ { "type": "ReturnStatement", - "start": 706, - "end": 739, + "start": 675, + "end": 718, "loc": { "start": { - "line": 37, - "column": 16 + "line": 36, + "column": 14 }, "end": { - "line": 37, - "column": 49 + "line": 36, + "column": 57 } }, "argument": { "type": "LogicalExpression", - "start": 713, - "end": 739, + "start": 682, + "end": 718, "loc": { "start": { - "line": 37, - "column": 23 + "line": 36, + "column": 21 }, "end": { - "line": 37, - "column": 49 + "line": 36, + "column": 57 } }, "left": { "type": "BinaryExpression", - "start": 713, - "end": 724, + "start": 682, + "end": 698, "loc": { "start": { - "line": 37, - "column": 23 + "line": 36, + "column": 21 }, "end": { - "line": 37, - "column": 34 + "line": 36, + "column": 37 } }, "left": { - "type": "PrivateName", - "start": 714, - "end": 715, + "type": "MemberExpression", + "start": 682, + "end": 689, "loc": { "start": { - "line": 37, - "column": 24 + "line": 36, + "column": 21 }, "end": { - "line": 37, - "column": 25 + "line": 36, + "column": 28 } }, - "name": { - "type": "Identifier", - "start": 714, - "end": 715, + "object": { + "type": "ThisExpression", + "start": 682, + "end": 686, "loc": { "start": { - "line": 37, - "column": 24 + "line": 36, + "column": 21 }, "end": { - "line": 37, + "line": 36, "column": 25 + } + } + }, + "property": { + "type": "PrivateName", + "start": 688, + "end": 689, + "loc": { + "start": { + "line": 36, + "column": 27 }, - "identifierName": "x" + "end": { + "line": 36, + "column": 28 + } }, - "name": "x" - } + "name": { + "type": "Identifier", + "start": 688, + "end": 689, + "loc": { + "start": { + "line": 36, + "column": 27 + }, + "end": { + "line": 36, + "column": 28 + }, + "identifierName": "x" + }, + "name": "x" + } + }, + "computed": false }, "operator": "===", "right": { "type": "MemberExpression", - "start": 720, - "end": 724, + "start": 694, + "end": 698, "loc": { "start": { - "line": 37, - "column": 30 + "line": 36, + "column": 33 }, "end": { - "line": 37, - "column": 34 + "line": 36, + "column": 37 } }, "object": { "type": "Identifier", - "start": 720, - "end": 721, + "start": 694, + "end": 695, "loc": { "start": { - "line": 37, - "column": 30 + "line": 36, + "column": 33 }, "end": { - "line": 37, - "column": 31 + "line": 36, + "column": 34 }, "identifierName": "p" }, @@ -2979,30 +3506,30 @@ }, "property": { "type": "PrivateName", - "start": 723, - "end": 724, + "start": 697, + "end": 698, "loc": { "start": { - "line": 37, - "column": 33 + "line": 36, + "column": 36 }, "end": { - "line": 37, - "column": 34 + "line": 36, + "column": 37 } }, "name": { "type": "Identifier", - "start": 723, - "end": 724, + "start": 697, + "end": 698, "loc": { "start": { - "line": 37, - "column": 33 + "line": 36, + "column": 36 }, "end": { - "line": 37, - "column": 34 + "line": 36, + "column": 37 }, "identifierName": "x" }, @@ -3015,77 +3542,108 @@ "operator": "&&", "right": { "type": "BinaryExpression", - "start": 728, - "end": 739, + "start": 702, + "end": 718, "loc": { "start": { - "line": 37, - "column": 38 + "line": 36, + "column": 41 }, "end": { - "line": 37, - "column": 49 + "line": 36, + "column": 57 } }, "left": { - "type": "PrivateName", - "start": 729, - "end": 730, + "type": "MemberExpression", + "start": 702, + "end": 709, "loc": { "start": { - "line": 37, - "column": 39 + "line": 36, + "column": 41 }, "end": { - "line": 37, - "column": 40 + "line": 36, + "column": 48 } }, - "name": { - "type": "Identifier", - "start": 729, - "end": 730, + "object": { + "type": "ThisExpression", + "start": 702, + "end": 706, "loc": { "start": { - "line": 37, - "column": 39 + "line": 36, + "column": 41 }, "end": { - "line": 37, - "column": 40 + "line": 36, + "column": 45 + } + } + }, + "property": { + "type": "PrivateName", + "start": 708, + "end": 709, + "loc": { + "start": { + "line": 36, + "column": 47 }, - "identifierName": "y" + "end": { + "line": 36, + "column": 48 + } }, - "name": "y" - } + "name": { + "type": "Identifier", + "start": 708, + "end": 709, + "loc": { + "start": { + "line": 36, + "column": 47 + }, + "end": { + "line": 36, + "column": 48 + }, + "identifierName": "y" + }, + "name": "y" + } + }, + "computed": false }, "operator": "===", "right": { "type": "MemberExpression", - "start": 735, - "end": 739, + "start": 714, + "end": 718, "loc": { "start": { - "line": 37, - "column": 45 + "line": 36, + "column": 53 }, "end": { - "line": 37, - "column": 49 + "line": 36, + "column": 57 } }, "object": { "type": "Identifier", - "start": 735, - "end": 736, + "start": 714, + "end": 715, "loc": { "start": { - "line": 37, - "column": 45 + "line": 36, + "column": 53 }, "end": { - "line": 37, - "column": 46 + "line": 36, + "column": 54 }, "identifierName": "p" }, @@ -3093,30 +3651,30 @@ }, "property": { "type": "PrivateName", - "start": 738, - "end": 739, + "start": 717, + "end": 718, "loc": { "start": { - "line": 37, - "column": 48 + "line": 36, + "column": 56 }, "end": { - "line": 37, - "column": 49 + "line": 36, + "column": 57 } }, "name": { "type": "Identifier", - "start": 738, - "end": 739, + "start": 717, + "end": 718, "loc": { "start": { - "line": 37, - "column": 48 + "line": 36, + "column": 56 }, "end": { - "line": 37, - "column": 49 + "line": 36, + "column": 57 }, "identifierName": "y" }, @@ -3134,32 +3692,32 @@ }, { "type": "ClassMethod", - "start": 747, - "end": 793, + "start": 724, + "end": 780, "loc": { "start": { - "line": 39, - "column": 4 + "line": 38, + "column": 2 }, "end": { - "line": 39, - "column": 50 + "line": 38, + "column": 58 } }, "static": false, "computed": false, "key": { "type": "Identifier", - "start": 747, - "end": 755, + "start": 724, + "end": 732, "loc": { "start": { - "line": 39, - "column": 4 + "line": 38, + "column": 2 }, "end": { - "line": 39, - "column": 12 + "line": 38, + "column": 10 }, "identifierName": "toString" }, @@ -3173,126 +3731,188 @@ "params": [], "body": { "type": "BlockStatement", - "start": 758, - "end": 793, + "start": 735, + "end": 780, "loc": { "start": { - "line": 39, - "column": 15 + "line": 38, + "column": 13 }, "end": { - "line": 39, - "column": 50 + "line": 38, + "column": 58 } }, "body": [ { "type": "ReturnStatement", - "start": 760, - "end": 791, + "start": 737, + "end": 778, "loc": { "start": { - "line": 39, - "column": 17 + "line": 38, + "column": 15 }, "end": { - "line": 39, - "column": 48 + "line": 38, + "column": 56 } }, "argument": { "type": "TemplateLiteral", - "start": 767, - "end": 791, + "start": 744, + "end": 778, "loc": { "start": { - "line": 39, - "column": 24 + "line": 38, + "column": 22 }, "end": { - "line": 39, - "column": 48 + "line": 38, + "column": 56 } }, "expressions": [ { - "type": "PrivateName", - "start": 778, - "end": 779, + "type": "MemberExpression", + "start": 754, + "end": 761, "loc": { "start": { - "line": 39, - "column": 35 + "line": 38, + "column": 32 }, "end": { - "line": 39, - "column": 36 + "line": 38, + "column": 39 } }, - "name": { - "type": "Identifier", - "start": 778, - "end": 779, + "object": { + "type": "ThisExpression", + "start": 754, + "end": 758, "loc": { "start": { - "line": 39, - "column": 35 + "line": 38, + "column": 32 }, "end": { - "line": 39, + "line": 38, "column": 36 + } + } + }, + "property": { + "type": "PrivateName", + "start": 760, + "end": 761, + "loc": { + "start": { + "line": 38, + "column": 38 }, - "identifierName": "x" + "end": { + "line": 38, + "column": 39 + } }, - "name": "x" - } + "name": { + "type": "Identifier", + "start": 760, + "end": 761, + "loc": { + "start": { + "line": 38, + "column": 38 + }, + "end": { + "line": 38, + "column": 39 + }, + "identifierName": "x" + }, + "name": "x" + } + }, + "computed": false }, { - "type": "PrivateName", - "start": 786, - "end": 787, + "type": "MemberExpression", + "start": 767, + "end": 774, "loc": { "start": { - "line": 39, - "column": 43 + "line": 38, + "column": 45 }, "end": { - "line": 39, - "column": 44 + "line": 38, + "column": 52 } }, - "name": { - "type": "Identifier", - "start": 786, - "end": 787, + "object": { + "type": "ThisExpression", + "start": 767, + "end": 771, "loc": { "start": { - "line": 39, - "column": 43 + "line": 38, + "column": 45 }, "end": { - "line": 39, - "column": 44 + "line": 38, + "column": 49 + } + } + }, + "property": { + "type": "PrivateName", + "start": 773, + "end": 774, + "loc": { + "start": { + "line": 38, + "column": 51 }, - "identifierName": "y" + "end": { + "line": 38, + "column": 52 + } }, - "name": "y" - } + "name": { + "type": "Identifier", + "start": 773, + "end": 774, + "loc": { + "start": { + "line": 38, + "column": 51 + }, + "end": { + "line": 38, + "column": 52 + }, + "identifierName": "y" + }, + "name": "y" + } + }, + "computed": false } ], "quasis": [ { "type": "TemplateElement", - "start": 768, - "end": 774, + "start": 745, + "end": 751, "loc": { "start": { - "line": 39, - "column": 25 + "line": 38, + "column": 23 }, "end": { - "line": 39, - "column": 31 + "line": 38, + "column": 29 } }, "value": { @@ -3303,16 +3923,16 @@ }, { "type": "TemplateElement", - "start": 781, - "end": 782, + "start": 763, + "end": 764, "loc": { "start": { - "line": 39, - "column": 38 + "line": 38, + "column": 41 }, "end": { - "line": 39, - "column": 39 + "line": 38, + "column": 42 } }, "value": { @@ -3323,16 +3943,16 @@ }, { "type": "TemplateElement", - "start": 789, - "end": 790, + "start": 776, + "end": 777, "loc": { "start": { - "line": 39, - "column": 46 + "line": 38, + "column": 54 }, "end": { - "line": 39, - "column": 47 + "line": 38, + "column": 55 } }, "value": { @@ -3354,4 +3974,4 @@ ], "directives": [] } -} +} \ No newline at end of file diff --git a/test/fixtures/experimental/class-private-properties/pbn-success/actual.js b/test/fixtures/experimental/class-private-properties/pbn-success/actual.js index 9c17fc00e8..119f431c52 100644 --- a/test/fixtures/experimental/class-private-properties/pbn-success/actual.js +++ b/test/fixtures/experimental/class-private-properties/pbn-success/actual.js @@ -1,19 +1,19 @@ class Point { - #x; - #y; + #x = 1; + #y = 2; - constructor(x = 0, y = 0) { - #x = +x; - #y = +y; - } + constructor(x = 0, y = 0) { + this.#x = +x; + this.#y = +y; + } - get x() { return #x } - set x(value) { #x = +value } + get x() { return this.#x } + set x(value) { this.#x = +value } - get y() { return #y } - set y(value) { #y = +value } + get y() { return this.#y } + set y(value) { this.#y = +value } - equals(p) { return #x === p.#x && #y === p.#y } + equals(p) { return this.#x === p.#x && this.#y === p.#y } - toString() { return `Point<${ #x },${ #y }>` } + toString() { return `Point<${ this.#x },${ this.#y }>` } } diff --git a/test/fixtures/experimental/class-private-properties/pbn-success/expected.json b/test/fixtures/experimental/class-private-properties/pbn-success/expected.json index a7b00beec5..ce6c7c1443 100644 --- a/test/fixtures/experimental/class-private-properties/pbn-success/expected.json +++ b/test/fixtures/experimental/class-private-properties/pbn-success/expected.json @@ -1,7 +1,7 @@ { "type": "File", "start": 0, - "end": 329, + "end": 359, "loc": { "start": { "line": 1, @@ -15,7 +15,7 @@ "program": { "type": "Program", "start": 0, - "end": 329, + "end": 359, "loc": { "start": { "line": 1, @@ -31,7 +31,7 @@ { "type": "ClassDeclaration", "start": 0, - "end": 329, + "end": 359, "loc": { "start": { "line": 1, @@ -63,7 +63,7 @@ "body": { "type": "ClassBody", "start": 12, - "end": 329, + "end": 359, "loc": { "start": { "line": 1, @@ -77,50 +77,69 @@ "body": [ { "type": "ClassPrivateProperty", - "start": 18, - "end": 21, + "start": 16, + "end": 23, "loc": { "start": { "line": 2, - "column": 4 + "column": 2 }, "end": { "line": 2, - "column": 7 + "column": 9 } }, "key": { "type": "Identifier", - "start": 19, - "end": 20, + "start": 17, + "end": 18, "loc": { "start": { "line": 2, - "column": 5 + "column": 3 }, "end": { "line": 2, - "column": 6 + "column": 4 }, "identifierName": "x" }, "name": "x" }, "static": false, - "value": null + "value": { + "type": "NumericLiteral", + "start": 21, + "end": 22, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 8 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + } }, { "type": "ClassPrivateProperty", "start": 26, - "end": 29, + "end": 33, "loc": { "start": { "line": 3, - "column": 4 + "column": 2 }, "end": { "line": 3, - "column": 7 + "column": 9 } }, "key": { @@ -130,47 +149,66 @@ "loc": { "start": { "line": 3, - "column": 5 + "column": 3 }, "end": { "line": 3, - "column": 6 + "column": 4 }, "identifierName": "y" }, "name": "y" }, "static": false, - "value": null + "value": { + "type": "NumericLiteral", + "start": 31, + "end": 32, + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + }, + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 + } }, { "type": "ClassMethod", - "start": 35, - "end": 102, + "start": 37, + "end": 104, "loc": { "start": { "line": 5, - "column": 4 + "column": 2 }, "end": { "line": 8, - "column": 5 + "column": 3 } }, "static": false, "computed": false, "key": { "type": "Identifier", - "start": 35, - "end": 46, + "start": 37, + "end": 48, "loc": { "start": { "line": 5, - "column": 4 + "column": 2 }, "end": { "line": 5, - "column": 15 + "column": 13 }, "identifierName": "constructor" }, @@ -184,30 +222,30 @@ "params": [ { "type": "AssignmentPattern", - "start": 47, - "end": 52, + "start": 49, + "end": 54, "loc": { "start": { "line": 5, - "column": 16 + "column": 14 }, "end": { "line": 5, - "column": 21 + "column": 19 } }, "left": { "type": "Identifier", - "start": 47, - "end": 48, + "start": 49, + "end": 50, "loc": { "start": { "line": 5, - "column": 16 + "column": 14 }, "end": { "line": 5, - "column": 17 + "column": 15 }, "identifierName": "x" }, @@ -215,16 +253,16 @@ }, "right": { "type": "NumericLiteral", - "start": 51, - "end": 52, + "start": 53, + "end": 54, "loc": { "start": { "line": 5, - "column": 20 + "column": 18 }, "end": { "line": 5, - "column": 21 + "column": 19 } }, "extra": { @@ -236,30 +274,30 @@ }, { "type": "AssignmentPattern", - "start": 54, - "end": 59, + "start": 56, + "end": 61, "loc": { "start": { "line": 5, - "column": 23 + "column": 21 }, "end": { "line": 5, - "column": 28 + "column": 26 } }, "left": { "type": "Identifier", - "start": 54, - "end": 55, + "start": 56, + "end": 57, "loc": { "start": { "line": 5, - "column": 23 + "column": 21 }, "end": { "line": 5, - "column": 24 + "column": 22 }, "identifierName": "y" }, @@ -267,16 +305,16 @@ }, "right": { "type": "NumericLiteral", - "start": 58, - "end": 59, + "start": 60, + "end": 61, "loc": { "start": { "line": 5, - "column": 27 + "column": 25 }, "end": { "line": 5, - "column": 28 + "column": 26 } }, "extra": { @@ -289,108 +327,139 @@ ], "body": { "type": "BlockStatement", - "start": 61, - "end": 102, + "start": 63, + "end": 104, "loc": { "start": { "line": 5, - "column": 30 + "column": 28 }, "end": { "line": 8, - "column": 5 + "column": 3 } }, "body": [ { "type": "ExpressionStatement", - "start": 71, - "end": 79, + "start": 69, + "end": 82, "loc": { "start": { "line": 6, - "column": 8 + "column": 4 }, "end": { "line": 6, - "column": 16 + "column": 17 } }, "expression": { "type": "AssignmentExpression", - "start": 71, - "end": 78, + "start": 69, + "end": 81, "loc": { "start": { "line": 6, - "column": 8 + "column": 4 }, "end": { "line": 6, - "column": 15 + "column": 16 } }, "operator": "=", "left": { - "type": "PrivateName", - "start": 72, - "end": 73, + "type": "MemberExpression", + "start": 69, + "end": 76, "loc": { "start": { "line": 6, - "column": 9 + "column": 4 }, "end": { "line": 6, - "column": 10 + "column": 11 } }, - "name": { - "type": "Identifier", - "start": 72, + "object": { + "type": "ThisExpression", + "start": 69, "end": 73, "loc": { "start": { "line": 6, - "column": 9 + "column": 4 }, "end": { + "line": 6, + "column": 8 + } + } + }, + "property": { + "type": "PrivateName", + "start": 75, + "end": 76, + "loc": { + "start": { "line": 6, "column": 10 }, - "identifierName": "x" + "end": { + "line": 6, + "column": 11 + } }, - "name": "x" - } + "name": { + "type": "Identifier", + "start": 75, + "end": 76, + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 11 + }, + "identifierName": "x" + }, + "name": "x" + } + }, + "computed": false }, "right": { "type": "UnaryExpression", - "start": 76, - "end": 78, + "start": 79, + "end": 81, "loc": { "start": { "line": 6, - "column": 13 + "column": 14 }, "end": { "line": 6, - "column": 15 + "column": 16 } }, "operator": "+", "prefix": true, "argument": { "type": "Identifier", - "start": 77, - "end": 78, + "start": 80, + "end": 81, "loc": { "start": { "line": 6, - "column": 14 + "column": 15 }, "end": { "line": 6, - "column": 15 + "column": 16 }, "identifierName": "x" }, @@ -404,93 +473,124 @@ }, { "type": "ExpressionStatement", - "start": 88, - "end": 96, + "start": 87, + "end": 100, "loc": { "start": { "line": 7, - "column": 8 + "column": 4 }, "end": { "line": 7, - "column": 16 + "column": 17 } }, "expression": { "type": "AssignmentExpression", - "start": 88, - "end": 95, + "start": 87, + "end": 99, "loc": { "start": { "line": 7, - "column": 8 + "column": 4 }, "end": { "line": 7, - "column": 15 + "column": 16 } }, "operator": "=", "left": { - "type": "PrivateName", - "start": 89, - "end": 90, + "type": "MemberExpression", + "start": 87, + "end": 94, "loc": { "start": { "line": 7, - "column": 9 + "column": 4 }, "end": { "line": 7, - "column": 10 + "column": 11 } }, - "name": { - "type": "Identifier", - "start": 89, - "end": 90, + "object": { + "type": "ThisExpression", + "start": 87, + "end": 91, "loc": { "start": { "line": 7, - "column": 9 + "column": 4 }, "end": { + "line": 7, + "column": 8 + } + } + }, + "property": { + "type": "PrivateName", + "start": 93, + "end": 94, + "loc": { + "start": { "line": 7, "column": 10 }, - "identifierName": "y" + "end": { + "line": 7, + "column": 11 + } }, - "name": "y" - } + "name": { + "type": "Identifier", + "start": 93, + "end": 94, + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 11 + }, + "identifierName": "y" + }, + "name": "y" + } + }, + "computed": false }, "right": { "type": "UnaryExpression", - "start": 93, - "end": 95, + "start": 97, + "end": 99, "loc": { "start": { "line": 7, - "column": 13 + "column": 14 }, "end": { "line": 7, - "column": 15 + "column": 16 } }, "operator": "+", "prefix": true, "argument": { "type": "Identifier", - "start": 94, - "end": 95, + "start": 98, + "end": 99, "loc": { "start": { "line": 7, - "column": 14 + "column": 15 }, "end": { "line": 7, - "column": 15 + "column": 16 }, "identifierName": "y" }, @@ -509,15 +609,15 @@ { "type": "ClassMethod", "start": 108, - "end": 129, + "end": 134, "loc": { "start": { "line": 10, - "column": 4 + "column": 2 }, "end": { "line": 10, - "column": 25 + "column": 28 } }, "static": false, @@ -529,11 +629,11 @@ "loc": { "start": { "line": 10, - "column": 8 + "column": 6 }, "end": { "line": 10, - "column": 9 + "column": 7 }, "identifierName": "x" }, @@ -548,63 +648,94 @@ "body": { "type": "BlockStatement", "start": 116, - "end": 129, + "end": 134, "loc": { "start": { "line": 10, - "column": 12 + "column": 10 }, "end": { "line": 10, - "column": 25 + "column": 28 } }, "body": [ { "type": "ReturnStatement", "start": 118, - "end": 127, + "end": 132, "loc": { "start": { "line": 10, - "column": 14 + "column": 12 }, "end": { "line": 10, - "column": 23 + "column": 26 } }, "argument": { - "type": "PrivateName", - "start": 126, - "end": 127, + "type": "MemberExpression", + "start": 125, + "end": 132, "loc": { "start": { "line": 10, - "column": 22 + "column": 19 }, "end": { "line": 10, - "column": 23 + "column": 26 } }, - "name": { - "type": "Identifier", - "start": 126, - "end": 127, + "object": { + "type": "ThisExpression", + "start": 125, + "end": 129, "loc": { "start": { "line": 10, - "column": 22 + "column": 19 }, "end": { "line": 10, "column": 23 + } + } + }, + "property": { + "type": "PrivateName", + "start": 131, + "end": 132, + "loc": { + "start": { + "line": 10, + "column": 25 }, - "identifierName": "x" + "end": { + "line": 10, + "column": 26 + } }, - "name": "x" - } + "name": { + "type": "Identifier", + "start": 131, + "end": 132, + "loc": { + "start": { + "line": 10, + "column": 25 + }, + "end": { + "line": 10, + "column": 26 + }, + "identifierName": "x" + }, + "name": "x" + } + }, + "computed": false } } ], @@ -613,32 +744,32 @@ }, { "type": "ClassMethod", - "start": 134, - "end": 162, + "start": 137, + "end": 170, "loc": { "start": { "line": 11, - "column": 4 + "column": 2 }, "end": { "line": 11, - "column": 32 + "column": 35 } }, "static": false, "computed": false, "key": { "type": "Identifier", - "start": 138, - "end": 139, + "start": 141, + "end": 142, "loc": { "start": { "line": 11, - "column": 8 + "column": 6 }, "end": { "line": 11, - "column": 9 + "column": 7 }, "identifierName": "x" }, @@ -652,16 +783,16 @@ "params": [ { "type": "Identifier", - "start": 140, - "end": 145, + "start": 143, + "end": 148, "loc": { "start": { "line": 11, - "column": 10 + "column": 8 }, "end": { "line": 11, - "column": 15 + "column": 13 }, "identifierName": "value" }, @@ -670,108 +801,139 @@ ], "body": { "type": "BlockStatement", - "start": 147, - "end": 162, + "start": 150, + "end": 170, "loc": { "start": { "line": 11, - "column": 17 + "column": 15 }, "end": { "line": 11, - "column": 32 + "column": 35 } }, "body": [ { "type": "ExpressionStatement", - "start": 149, - "end": 160, + "start": 152, + "end": 168, "loc": { "start": { "line": 11, - "column": 19 + "column": 17 }, "end": { "line": 11, - "column": 30 + "column": 33 } }, "expression": { "type": "AssignmentExpression", - "start": 149, - "end": 160, + "start": 152, + "end": 168, "loc": { "start": { "line": 11, - "column": 19 + "column": 17 }, "end": { "line": 11, - "column": 30 + "column": 33 } }, "operator": "=", "left": { - "type": "PrivateName", - "start": 150, - "end": 151, + "type": "MemberExpression", + "start": 152, + "end": 159, "loc": { "start": { "line": 11, - "column": 20 + "column": 17 }, "end": { "line": 11, - "column": 21 + "column": 24 } }, - "name": { - "type": "Identifier", - "start": 150, - "end": 151, + "object": { + "type": "ThisExpression", + "start": 152, + "end": 156, "loc": { "start": { "line": 11, - "column": 20 + "column": 17 }, "end": { "line": 11, "column": 21 + } + } + }, + "property": { + "type": "PrivateName", + "start": 158, + "end": 159, + "loc": { + "start": { + "line": 11, + "column": 23 }, - "identifierName": "x" + "end": { + "line": 11, + "column": 24 + } }, - "name": "x" - } + "name": { + "type": "Identifier", + "start": 158, + "end": 159, + "loc": { + "start": { + "line": 11, + "column": 23 + }, + "end": { + "line": 11, + "column": 24 + }, + "identifierName": "x" + }, + "name": "x" + } + }, + "computed": false }, "right": { "type": "UnaryExpression", - "start": 154, - "end": 160, + "start": 162, + "end": 168, "loc": { "start": { "line": 11, - "column": 24 + "column": 27 }, "end": { "line": 11, - "column": 30 + "column": 33 } }, "operator": "+", "prefix": true, "argument": { "type": "Identifier", - "start": 155, - "end": 160, + "start": 163, + "end": 168, "loc": { "start": { "line": 11, - "column": 25 + "column": 28 }, "end": { "line": 11, - "column": 30 + "column": 33 }, "identifierName": "value" }, @@ -789,32 +951,32 @@ }, { "type": "ClassMethod", - "start": 168, - "end": 189, + "start": 174, + "end": 200, "loc": { "start": { "line": 13, - "column": 4 + "column": 2 }, "end": { "line": 13, - "column": 25 + "column": 28 } }, "static": false, "computed": false, "key": { "type": "Identifier", - "start": 172, - "end": 173, + "start": 178, + "end": 179, "loc": { "start": { "line": 13, - "column": 8 + "column": 6 }, "end": { "line": 13, - "column": 9 + "column": 7 }, "identifierName": "y" }, @@ -828,64 +990,95 @@ "params": [], "body": { "type": "BlockStatement", - "start": 176, - "end": 189, + "start": 182, + "end": 200, "loc": { "start": { "line": 13, - "column": 12 + "column": 10 }, "end": { "line": 13, - "column": 25 + "column": 28 } }, "body": [ { "type": "ReturnStatement", - "start": 178, - "end": 187, + "start": 184, + "end": 198, "loc": { "start": { "line": 13, - "column": 14 + "column": 12 }, "end": { "line": 13, - "column": 23 + "column": 26 } }, "argument": { - "type": "PrivateName", - "start": 186, - "end": 187, + "type": "MemberExpression", + "start": 191, + "end": 198, "loc": { "start": { "line": 13, - "column": 22 + "column": 19 }, "end": { "line": 13, - "column": 23 + "column": 26 } }, - "name": { - "type": "Identifier", - "start": 186, - "end": 187, + "object": { + "type": "ThisExpression", + "start": 191, + "end": 195, "loc": { "start": { "line": 13, - "column": 22 + "column": 19 }, "end": { "line": 13, "column": 23 + } + } + }, + "property": { + "type": "PrivateName", + "start": 197, + "end": 198, + "loc": { + "start": { + "line": 13, + "column": 25 }, - "identifierName": "y" + "end": { + "line": 13, + "column": 26 + } }, - "name": "y" - } + "name": { + "type": "Identifier", + "start": 197, + "end": 198, + "loc": { + "start": { + "line": 13, + "column": 25 + }, + "end": { + "line": 13, + "column": 26 + }, + "identifierName": "y" + }, + "name": "y" + } + }, + "computed": false } } ], @@ -894,32 +1087,32 @@ }, { "type": "ClassMethod", - "start": 194, - "end": 222, + "start": 203, + "end": 236, "loc": { "start": { "line": 14, - "column": 4 + "column": 2 }, "end": { "line": 14, - "column": 32 + "column": 35 } }, "static": false, "computed": false, "key": { "type": "Identifier", - "start": 198, - "end": 199, + "start": 207, + "end": 208, "loc": { "start": { "line": 14, - "column": 8 + "column": 6 }, "end": { "line": 14, - "column": 9 + "column": 7 }, "identifierName": "y" }, @@ -933,16 +1126,16 @@ "params": [ { "type": "Identifier", - "start": 200, - "end": 205, + "start": 209, + "end": 214, "loc": { "start": { "line": 14, - "column": 10 + "column": 8 }, "end": { "line": 14, - "column": 15 + "column": 13 }, "identifierName": "value" }, @@ -951,108 +1144,139 @@ ], "body": { "type": "BlockStatement", - "start": 207, - "end": 222, + "start": 216, + "end": 236, "loc": { "start": { "line": 14, - "column": 17 + "column": 15 }, "end": { "line": 14, - "column": 32 + "column": 35 } }, "body": [ { "type": "ExpressionStatement", - "start": 209, - "end": 220, + "start": 218, + "end": 234, "loc": { "start": { "line": 14, - "column": 19 + "column": 17 }, "end": { "line": 14, - "column": 30 + "column": 33 } }, "expression": { "type": "AssignmentExpression", - "start": 209, - "end": 220, + "start": 218, + "end": 234, "loc": { "start": { "line": 14, - "column": 19 + "column": 17 }, "end": { "line": 14, - "column": 30 + "column": 33 } }, "operator": "=", "left": { - "type": "PrivateName", - "start": 210, - "end": 211, + "type": "MemberExpression", + "start": 218, + "end": 225, "loc": { "start": { "line": 14, - "column": 20 + "column": 17 }, "end": { "line": 14, - "column": 21 + "column": 24 } }, - "name": { - "type": "Identifier", - "start": 210, - "end": 211, + "object": { + "type": "ThisExpression", + "start": 218, + "end": 222, "loc": { "start": { "line": 14, - "column": 20 + "column": 17 }, "end": { "line": 14, "column": 21 + } + } + }, + "property": { + "type": "PrivateName", + "start": 224, + "end": 225, + "loc": { + "start": { + "line": 14, + "column": 23 }, - "identifierName": "y" + "end": { + "line": 14, + "column": 24 + } }, - "name": "y" - } + "name": { + "type": "Identifier", + "start": 224, + "end": 225, + "loc": { + "start": { + "line": 14, + "column": 23 + }, + "end": { + "line": 14, + "column": 24 + }, + "identifierName": "y" + }, + "name": "y" + } + }, + "computed": false }, "right": { "type": "UnaryExpression", - "start": 214, - "end": 220, + "start": 228, + "end": 234, "loc": { "start": { "line": 14, - "column": 24 + "column": 27 }, "end": { "line": 14, - "column": 30 + "column": 33 } }, "operator": "+", "prefix": true, "argument": { "type": "Identifier", - "start": 215, - "end": 220, + "start": 229, + "end": 234, "loc": { "start": { "line": 14, - "column": 25 + "column": 28 }, "end": { "line": 14, - "column": 30 + "column": 33 }, "identifierName": "value" }, @@ -1070,32 +1294,32 @@ }, { "type": "ClassMethod", - "start": 228, - "end": 275, + "start": 240, + "end": 297, "loc": { "start": { "line": 16, - "column": 4 + "column": 2 }, "end": { "line": 16, - "column": 51 + "column": 59 } }, "static": false, "computed": false, "key": { "type": "Identifier", - "start": 228, - "end": 234, + "start": 240, + "end": 246, "loc": { "start": { "line": 16, - "column": 4 + "column": 2 }, "end": { "line": 16, - "column": 10 + "column": 8 }, "identifierName": "equals" }, @@ -1109,16 +1333,16 @@ "params": [ { "type": "Identifier", - "start": 235, - "end": 236, + "start": 247, + "end": 248, "loc": { "start": { "line": 16, - "column": 11 + "column": 9 }, "end": { "line": 16, - "column": 12 + "column": 10 }, "identifierName": "p" }, @@ -1127,129 +1351,143 @@ ], "body": { "type": "BlockStatement", - "start": 238, - "end": 275, + "start": 250, + "end": 297, "loc": { "start": { "line": 16, - "column": 14 + "column": 12 }, "end": { "line": 16, - "column": 51 + "column": 59 } }, "body": [ { "type": "ReturnStatement", - "start": 240, - "end": 273, + "start": 252, + "end": 295, "loc": { "start": { "line": 16, - "column": 16 + "column": 14 }, "end": { "line": 16, - "column": 49 + "column": 57 } }, "argument": { "type": "LogicalExpression", - "start": 247, - "end": 273, + "start": 259, + "end": 295, "loc": { "start": { "line": 16, - "column": 23 + "column": 21 }, "end": { "line": 16, - "column": 49 + "column": 57 } }, "left": { "type": "BinaryExpression", - "start": 247, - "end": 258, + "start": 259, + "end": 275, "loc": { "start": { "line": 16, - "column": 23 + "column": 21 }, "end": { "line": 16, - "column": 34 + "column": 37 } }, "left": { - "type": "PrivateName", - "start": 248, - "end": 249, + "type": "MemberExpression", + "start": 259, + "end": 266, "loc": { "start": { "line": 16, - "column": 24 + "column": 21 }, "end": { "line": 16, - "column": 25 + "column": 28 } }, - "name": { - "type": "Identifier", - "start": 248, - "end": 249, + "object": { + "type": "ThisExpression", + "start": 259, + "end": 263, "loc": { "start": { "line": 16, - "column": 24 + "column": 21 }, "end": { "line": 16, "column": 25 + } + } + }, + "property": { + "type": "PrivateName", + "start": 265, + "end": 266, + "loc": { + "start": { + "line": 16, + "column": 27 }, - "identifierName": "x" + "end": { + "line": 16, + "column": 28 + } }, - "name": "x" - } + "name": { + "type": "Identifier", + "start": 265, + "end": 266, + "loc": { + "start": { + "line": 16, + "column": 27 + }, + "end": { + "line": 16, + "column": 28 + }, + "identifierName": "x" + }, + "name": "x" + } + }, + "computed": false }, "operator": "===", "right": { "type": "MemberExpression", - "start": 254, - "end": 258, + "start": 271, + "end": 275, "loc": { "start": { "line": 16, - "column": 30 + "column": 33 }, "end": { "line": 16, - "column": 34 + "column": 37 } }, "object": { "type": "Identifier", - "start": 254, - "end": 255, - "loc": { - "start": { - "line": 16, - "column": 30 - }, - "end": { - "line": 16, - "column": 31 - }, - "identifierName": "p" - }, - "name": "p" - }, - "property": { - "type": "PrivateName", - "start": 257, - "end": 258, + "start": 271, + "end": 272, "loc": { "start": { "line": 16, @@ -1258,20 +1496,37 @@ "end": { "line": 16, "column": 34 + }, + "identifierName": "p" + }, + "name": "p" + }, + "property": { + "type": "PrivateName", + "start": 274, + "end": 275, + "loc": { + "start": { + "line": 16, + "column": 36 + }, + "end": { + "line": 16, + "column": 37 } }, "name": { "type": "Identifier", - "start": 257, - "end": 258, + "start": 274, + "end": 275, "loc": { "start": { "line": 16, - "column": 33 + "column": 36 }, "end": { "line": 16, - "column": 34 + "column": 37 }, "identifierName": "x" }, @@ -1284,77 +1539,108 @@ "operator": "&&", "right": { "type": "BinaryExpression", - "start": 262, - "end": 273, + "start": 279, + "end": 295, "loc": { "start": { "line": 16, - "column": 38 + "column": 41 }, "end": { "line": 16, - "column": 49 + "column": 57 } }, "left": { - "type": "PrivateName", - "start": 263, - "end": 264, + "type": "MemberExpression", + "start": 279, + "end": 286, "loc": { "start": { "line": 16, - "column": 39 + "column": 41 }, "end": { "line": 16, - "column": 40 + "column": 48 } }, - "name": { - "type": "Identifier", - "start": 263, - "end": 264, + "object": { + "type": "ThisExpression", + "start": 279, + "end": 283, "loc": { "start": { "line": 16, - "column": 39 + "column": 41 }, "end": { "line": 16, - "column": 40 + "column": 45 + } + } + }, + "property": { + "type": "PrivateName", + "start": 285, + "end": 286, + "loc": { + "start": { + "line": 16, + "column": 47 }, - "identifierName": "y" + "end": { + "line": 16, + "column": 48 + } }, - "name": "y" - } + "name": { + "type": "Identifier", + "start": 285, + "end": 286, + "loc": { + "start": { + "line": 16, + "column": 47 + }, + "end": { + "line": 16, + "column": 48 + }, + "identifierName": "y" + }, + "name": "y" + } + }, + "computed": false }, "operator": "===", "right": { "type": "MemberExpression", - "start": 269, - "end": 273, + "start": 291, + "end": 295, "loc": { "start": { "line": 16, - "column": 45 + "column": 53 }, "end": { "line": 16, - "column": 49 + "column": 57 } }, "object": { "type": "Identifier", - "start": 269, - "end": 270, + "start": 291, + "end": 292, "loc": { "start": { "line": 16, - "column": 45 + "column": 53 }, "end": { "line": 16, - "column": 46 + "column": 54 }, "identifierName": "p" }, @@ -1362,30 +1648,30 @@ }, "property": { "type": "PrivateName", - "start": 272, - "end": 273, + "start": 294, + "end": 295, "loc": { "start": { "line": 16, - "column": 48 + "column": 56 }, "end": { "line": 16, - "column": 49 + "column": 57 } }, "name": { "type": "Identifier", - "start": 272, - "end": 273, + "start": 294, + "end": 295, "loc": { "start": { "line": 16, - "column": 48 + "column": 56 }, "end": { "line": 16, - "column": 49 + "column": 57 }, "identifierName": "y" }, @@ -1403,32 +1689,32 @@ }, { "type": "ClassMethod", - "start": 281, - "end": 327, + "start": 301, + "end": 357, "loc": { "start": { "line": 18, - "column": 4 + "column": 2 }, "end": { "line": 18, - "column": 50 + "column": 58 } }, "static": false, "computed": false, "key": { "type": "Identifier", - "start": 281, - "end": 289, + "start": 301, + "end": 309, "loc": { "start": { "line": 18, - "column": 4 + "column": 2 }, "end": { "line": 18, - "column": 12 + "column": 10 }, "identifierName": "toString" }, @@ -1442,126 +1728,188 @@ "params": [], "body": { "type": "BlockStatement", - "start": 292, - "end": 327, + "start": 312, + "end": 357, "loc": { "start": { "line": 18, - "column": 15 + "column": 13 }, "end": { "line": 18, - "column": 50 + "column": 58 } }, "body": [ { "type": "ReturnStatement", - "start": 294, - "end": 325, + "start": 314, + "end": 355, "loc": { "start": { "line": 18, - "column": 17 + "column": 15 }, "end": { "line": 18, - "column": 48 + "column": 56 } }, "argument": { "type": "TemplateLiteral", - "start": 301, - "end": 325, + "start": 321, + "end": 355, "loc": { "start": { "line": 18, - "column": 24 + "column": 22 }, "end": { "line": 18, - "column": 48 + "column": 56 } }, "expressions": [ { - "type": "PrivateName", - "start": 312, - "end": 313, + "type": "MemberExpression", + "start": 331, + "end": 338, "loc": { "start": { "line": 18, - "column": 35 + "column": 32 }, "end": { "line": 18, - "column": 36 + "column": 39 } }, - "name": { - "type": "Identifier", - "start": 312, - "end": 313, + "object": { + "type": "ThisExpression", + "start": 331, + "end": 335, "loc": { "start": { "line": 18, - "column": 35 + "column": 32 }, "end": { "line": 18, "column": 36 - }, - "identifierName": "x" - }, - "name": "x" - } - }, - { - "type": "PrivateName", - "start": 320, - "end": 321, - "loc": { - "start": { - "line": 18, - "column": 43 - }, - "end": { - "line": 18, - "column": 44 + } } }, - "name": { - "type": "Identifier", - "start": 320, - "end": 321, + "property": { + "type": "PrivateName", + "start": 337, + "end": 338, "loc": { "start": { "line": 18, - "column": 43 + "column": 38 }, "end": { "line": 18, - "column": 44 - }, - "identifierName": "y" + "column": 39 + } }, - "name": "y" - } + "name": { + "type": "Identifier", + "start": 337, + "end": 338, + "loc": { + "start": { + "line": 18, + "column": 38 + }, + "end": { + "line": 18, + "column": 39 + }, + "identifierName": "x" + }, + "name": "x" + } + }, + "computed": false + }, + { + "type": "MemberExpression", + "start": 344, + "end": 351, + "loc": { + "start": { + "line": 18, + "column": 45 + }, + "end": { + "line": 18, + "column": 52 + } + }, + "object": { + "type": "ThisExpression", + "start": 344, + "end": 348, + "loc": { + "start": { + "line": 18, + "column": 45 + }, + "end": { + "line": 18, + "column": 49 + } + } + }, + "property": { + "type": "PrivateName", + "start": 350, + "end": 351, + "loc": { + "start": { + "line": 18, + "column": 51 + }, + "end": { + "line": 18, + "column": 52 + } + }, + "name": { + "type": "Identifier", + "start": 350, + "end": 351, + "loc": { + "start": { + "line": 18, + "column": 51 + }, + "end": { + "line": 18, + "column": 52 + }, + "identifierName": "y" + }, + "name": "y" + } + }, + "computed": false } ], "quasis": [ { "type": "TemplateElement", - "start": 302, - "end": 308, + "start": 322, + "end": 328, "loc": { "start": { "line": 18, - "column": 25 + "column": 23 }, "end": { "line": 18, - "column": 31 + "column": 29 } }, "value": { @@ -1572,16 +1920,16 @@ }, { "type": "TemplateElement", - "start": 315, - "end": 316, + "start": 340, + "end": 341, "loc": { "start": { "line": 18, - "column": 38 + "column": 41 }, "end": { "line": 18, - "column": 39 + "column": 42 } }, "value": { @@ -1592,16 +1940,16 @@ }, { "type": "TemplateElement", - "start": 323, - "end": 324, + "start": 353, + "end": 354, "loc": { "start": { "line": 18, - "column": 46 + "column": 54 }, "end": { "line": 18, - "column": 47 + "column": 55 } }, "value": { @@ -1623,4 +1971,4 @@ ], "directives": [] } -} +} \ No newline at end of file