Merge branch 'master' into feat-optional-chaining
This commit is contained in:
@@ -123,7 +123,6 @@
|
||||
}
|
||||
},
|
||||
"method": false,
|
||||
"shorthand": true,
|
||||
"computed": false,
|
||||
"key": {
|
||||
"type": "Identifier",
|
||||
@@ -142,6 +141,7 @@
|
||||
},
|
||||
"name": "bar"
|
||||
},
|
||||
"shorthand": true,
|
||||
"value": {
|
||||
"type": "AssignmentPattern",
|
||||
"start": 18,
|
||||
|
||||
@@ -104,7 +104,6 @@
|
||||
}
|
||||
},
|
||||
"method": true,
|
||||
"shorthand": false,
|
||||
"computed": false,
|
||||
"key": {
|
||||
"type": "Identifier",
|
||||
|
||||
4
test/fixtures/experimental/class-private-properties/asi-failure-computed/actual.js
vendored
Normal file
4
test/fixtures/experimental/class-private-properties/asi-failure-computed/actual.js
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
class Foo {
|
||||
#p = x
|
||||
[#m] () {}
|
||||
}
|
||||
7
test/fixtures/experimental/class-private-properties/asi-failure-computed/options.json
vendored
Normal file
7
test/fixtures/experimental/class-private-properties/asi-failure-computed/options.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"throws": "Unexpected token, expected ; (3:10)",
|
||||
"plugins": [
|
||||
"classProperties",
|
||||
"classPrivateProperties"
|
||||
]
|
||||
}
|
||||
4
test/fixtures/experimental/class-private-properties/asi-failure-generator/actual.js
vendored
Normal file
4
test/fixtures/experimental/class-private-properties/asi-failure-generator/actual.js
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
class Foo {
|
||||
#p = x
|
||||
*#m () {}
|
||||
}
|
||||
4
test/fixtures/experimental/class-private-properties/asi-failure-generator/options.json
vendored
Normal file
4
test/fixtures/experimental/class-private-properties/asi-failure-generator/options.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"throws": "Unexpected token, expected ; (3:9)",
|
||||
"plugins": ["classProperties", "classPrivateProperties"]
|
||||
}
|
||||
3
test/fixtures/experimental/class-private-properties/asi-failure-inline/actual.js
vendored
Normal file
3
test/fixtures/experimental/class-private-properties/asi-failure-inline/actual.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
class Foo {
|
||||
#x #y
|
||||
}
|
||||
4
test/fixtures/experimental/class-private-properties/asi-failure-inline/options.json
vendored
Normal file
4
test/fixtures/experimental/class-private-properties/asi-failure-inline/options.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"throws": "Unexpected token, expected ; (2:5)",
|
||||
"plugins": ["classProperties", "classPrivateProperties"]
|
||||
}
|
||||
4
test/fixtures/experimental/class-private-properties/asi-success/actual.js
vendored
Normal file
4
test/fixtures/experimental/class-private-properties/asi-success/actual.js
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
class Foo {
|
||||
#x
|
||||
#y
|
||||
}
|
||||
152
test/fixtures/experimental/class-private-properties/asi-success/expected.json
vendored
Normal file
152
test/fixtures/experimental/class-private-properties/asi-success/expected.json
vendored
Normal file
@@ -0,0 +1,152 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start": 0,
|
||||
"end": 23,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 4,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
"end": 23,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 4,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"body": [
|
||||
{
|
||||
"type": "ClassDeclaration",
|
||||
"start": 0,
|
||||
"end": 23,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 4,
|
||||
"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": 23,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 10
|
||||
},
|
||||
"end": {
|
||||
"line": 4,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"body": [
|
||||
{
|
||||
"type": "ClassPrivateProperty",
|
||||
"start": 14,
|
||||
"end": 16,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 2
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 4
|
||||
}
|
||||
},
|
||||
"computed": false,
|
||||
"key": {
|
||||
"type": "Identifier",
|
||||
"start": 15,
|
||||
"end": 16,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 3
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 4
|
||||
},
|
||||
"identifierName": "x"
|
||||
},
|
||||
"name": "x"
|
||||
},
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"type": "ClassPrivateProperty",
|
||||
"start": 19,
|
||||
"end": 21,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 2
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 4
|
||||
}
|
||||
},
|
||||
"computed": false,
|
||||
"key": {
|
||||
"type": "Identifier",
|
||||
"start": 20,
|
||||
"end": 21,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 3
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 4
|
||||
},
|
||||
"identifierName": "y"
|
||||
},
|
||||
"name": "y"
|
||||
},
|
||||
"value": null
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
3
test/fixtures/experimental/class-private-properties/asi-success/options.json
vendored
Normal file
3
test/fixtures/experimental/class-private-properties/asi-success/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"plugins": ["classProperties", "classPrivateProperties"]
|
||||
}
|
||||
3
test/fixtures/experimental/class-private-properties/inline/actual.js
vendored
Normal file
3
test/fixtures/experimental/class-private-properties/inline/actual.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
class A { #x; #y; }
|
||||
|
||||
class B { #x = 0; #y = 1; }
|
||||
308
test/fixtures/experimental/class-private-properties/inline/expected.json
vendored
Normal file
308
test/fixtures/experimental/class-private-properties/inline/expected.json
vendored
Normal file
@@ -0,0 +1,308 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start": 0,
|
||||
"end": 48,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
"end": 48,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"body": [
|
||||
{
|
||||
"type": "ClassDeclaration",
|
||||
"start": 0,
|
||||
"end": 19,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 19
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 7,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 6
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 7
|
||||
},
|
||||
"identifierName": "A"
|
||||
},
|
||||
"name": "A"
|
||||
},
|
||||
"superClass": null,
|
||||
"body": {
|
||||
"type": "ClassBody",
|
||||
"start": 8,
|
||||
"end": 19,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 8
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 19
|
||||
}
|
||||
},
|
||||
"body": [
|
||||
{
|
||||
"type": "ClassPrivateProperty",
|
||||
"start": 10,
|
||||
"end": 13,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 10
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 13
|
||||
}
|
||||
},
|
||||
"computed": false,
|
||||
"key": {
|
||||
"type": "Identifier",
|
||||
"start": 11,
|
||||
"end": 12,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 11
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 12
|
||||
},
|
||||
"identifierName": "x"
|
||||
},
|
||||
"name": "x"
|
||||
},
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"type": "ClassPrivateProperty",
|
||||
"start": 14,
|
||||
"end": 17,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 14
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 17
|
||||
}
|
||||
},
|
||||
"computed": false,
|
||||
"key": {
|
||||
"type": "Identifier",
|
||||
"start": 15,
|
||||
"end": 16,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 15
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 16
|
||||
},
|
||||
"identifierName": "y"
|
||||
},
|
||||
"name": "y"
|
||||
},
|
||||
"value": null
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "ClassDeclaration",
|
||||
"start": 21,
|
||||
"end": 48,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 27,
|
||||
"end": 28,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 6
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 7
|
||||
},
|
||||
"identifierName": "B"
|
||||
},
|
||||
"name": "B"
|
||||
},
|
||||
"superClass": null,
|
||||
"body": {
|
||||
"type": "ClassBody",
|
||||
"start": 29,
|
||||
"end": 48,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 8
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
"body": [
|
||||
{
|
||||
"type": "ClassPrivateProperty",
|
||||
"start": 31,
|
||||
"end": 38,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 10
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 17
|
||||
}
|
||||
},
|
||||
"computed": false,
|
||||
"key": {
|
||||
"type": "Identifier",
|
||||
"start": 32,
|
||||
"end": 33,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 11
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 12
|
||||
},
|
||||
"identifierName": "x"
|
||||
},
|
||||
"name": "x"
|
||||
},
|
||||
"value": {
|
||||
"type": "NumericLiteral",
|
||||
"start": 36,
|
||||
"end": 37,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 15
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"rawValue": 0,
|
||||
"raw": "0"
|
||||
},
|
||||
"value": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "ClassPrivateProperty",
|
||||
"start": 39,
|
||||
"end": 46,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 18
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 25
|
||||
}
|
||||
},
|
||||
"computed": false,
|
||||
"key": {
|
||||
"type": "Identifier",
|
||||
"start": 40,
|
||||
"end": 41,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 19
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 20
|
||||
},
|
||||
"identifierName": "y"
|
||||
},
|
||||
"name": "y"
|
||||
},
|
||||
"value": {
|
||||
"type": "NumericLiteral",
|
||||
"start": 44,
|
||||
"end": 45,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 23
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 24
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"rawValue": 1,
|
||||
"raw": "1"
|
||||
},
|
||||
"value": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
3
test/fixtures/experimental/class-private-properties/inline/options.json
vendored
Normal file
3
test/fixtures/experimental/class-private-properties/inline/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"plugins": ["classProperties", "classPrivateProperties"]
|
||||
}
|
||||
19
test/fixtures/experimental/class-private-properties/pbn-success.1/actual.js
vendored
Normal file
19
test/fixtures/experimental/class-private-properties/pbn-success.1/actual.js
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
class Point {
|
||||
#x;
|
||||
#y;
|
||||
|
||||
constructor(x = 0, y = 0) {
|
||||
#x = +x;
|
||||
#y = +y;
|
||||
}
|
||||
|
||||
get x() { return this.#x }
|
||||
set x(value) { this.#x = +value }
|
||||
|
||||
get y() { return this.#y }
|
||||
set y(value) { this.#y = +value }
|
||||
|
||||
equals(p) { return this.#x === p.#x && this.#y === p.#y }
|
||||
|
||||
toString() { return `Point<${ this.#x },${ this.#y }>` }
|
||||
}
|
||||
1874
test/fixtures/experimental/class-private-properties/pbn-success.1/expected.json
vendored
Normal file
1874
test/fixtures/experimental/class-private-properties/pbn-success.1/expected.json
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3
test/fixtures/experimental/class-private-properties/pbn-success.1/options.json
vendored
Normal file
3
test/fixtures/experimental/class-private-properties/pbn-success.1/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"plugins": ["classProperties", "classPrivateProperties"]
|
||||
}
|
||||
19
test/fixtures/experimental/class-private-properties/pbn-success/actual.js
vendored
Normal file
19
test/fixtures/experimental/class-private-properties/pbn-success/actual.js
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
class Point {
|
||||
#x;
|
||||
#y;
|
||||
|
||||
constructor(x = 0, y = 0) {
|
||||
#x = +x;
|
||||
#y = +y;
|
||||
}
|
||||
|
||||
get x() { return #x }
|
||||
set x(value) { #x = +value }
|
||||
|
||||
get y() { return #y }
|
||||
set y(value) { #y = +value }
|
||||
|
||||
equals(p) { return #x === p.#x && #y === p.#y }
|
||||
|
||||
toString() { return `Point<${ #x },${ #y }>` }
|
||||
}
|
||||
1626
test/fixtures/experimental/class-private-properties/pbn-success/expected.json
vendored
Normal file
1626
test/fixtures/experimental/class-private-properties/pbn-success/expected.json
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3
test/fixtures/experimental/class-private-properties/pbn-success/options.json
vendored
Normal file
3
test/fixtures/experimental/class-private-properties/pbn-success/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"plugins": ["classProperties", "classPrivateProperties"]
|
||||
}
|
||||
3
test/fixtures/experimental/class-properties/super/actual.js
vendored
Normal file
3
test/fixtures/experimental/class-properties/super/actual.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
class Fails extends class { c(){} } {
|
||||
c = super.c();
|
||||
}
|
||||
272
test/fixtures/experimental/class-properties/super/expected.json
vendored
Normal file
272
test/fixtures/experimental/class-properties/super/expected.json
vendored
Normal file
@@ -0,0 +1,272 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start": 0,
|
||||
"end": 56,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
"end": 56,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"body": [
|
||||
{
|
||||
"type": "ClassDeclaration",
|
||||
"start": 0,
|
||||
"end": 56,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 11,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 6
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 11
|
||||
},
|
||||
"identifierName": "Fails"
|
||||
},
|
||||
"name": "Fails"
|
||||
},
|
||||
"superClass": {
|
||||
"type": "ClassExpression",
|
||||
"start": 20,
|
||||
"end": 35,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 20
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 35
|
||||
}
|
||||
},
|
||||
"id": null,
|
||||
"superClass": null,
|
||||
"body": {
|
||||
"type": "ClassBody",
|
||||
"start": 26,
|
||||
"end": 35,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 26
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 35
|
||||
}
|
||||
},
|
||||
"body": [
|
||||
{
|
||||
"type": "ClassMethod",
|
||||
"start": 28,
|
||||
"end": 33,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 28
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 33
|
||||
}
|
||||
},
|
||||
"static": false,
|
||||
"computed": false,
|
||||
"key": {
|
||||
"type": "Identifier",
|
||||
"start": 28,
|
||||
"end": 29,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 28
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 29
|
||||
},
|
||||
"identifierName": "c"
|
||||
},
|
||||
"name": "c"
|
||||
},
|
||||
"kind": "method",
|
||||
"id": null,
|
||||
"generator": false,
|
||||
"expression": false,
|
||||
"async": false,
|
||||
"params": [],
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start": 31,
|
||||
"end": 33,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 31
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 33
|
||||
}
|
||||
},
|
||||
"body": [],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"body": {
|
||||
"type": "ClassBody",
|
||||
"start": 36,
|
||||
"end": 56,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 36
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"body": [
|
||||
{
|
||||
"type": "ClassProperty",
|
||||
"start": 40,
|
||||
"end": 54,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 2
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"static": false,
|
||||
"computed": false,
|
||||
"key": {
|
||||
"type": "Identifier",
|
||||
"start": 40,
|
||||
"end": 41,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 2
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 3
|
||||
},
|
||||
"identifierName": "c"
|
||||
},
|
||||
"name": "c"
|
||||
},
|
||||
"value": {
|
||||
"type": "CallExpression",
|
||||
"start": 44,
|
||||
"end": 53,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 6
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"callee": {
|
||||
"type": "MemberExpression",
|
||||
"start": 44,
|
||||
"end": 51,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 6
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 13
|
||||
}
|
||||
},
|
||||
"object": {
|
||||
"type": "Super",
|
||||
"start": 44,
|
||||
"end": 49,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 6
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 11
|
||||
}
|
||||
}
|
||||
},
|
||||
"property": {
|
||||
"type": "Identifier",
|
||||
"start": 50,
|
||||
"end": 51,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 12
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 13
|
||||
},
|
||||
"identifierName": "c"
|
||||
},
|
||||
"name": "c"
|
||||
},
|
||||
"computed": false
|
||||
},
|
||||
"arguments": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
3
test/fixtures/experimental/class-properties/super/options.json
vendored
Normal file
3
test/fixtures/experimental/class-properties/super/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"plugins": ["classProperties"]
|
||||
}
|
||||
@@ -274,7 +274,6 @@
|
||||
}
|
||||
},
|
||||
"method": false,
|
||||
"shorthand": false,
|
||||
"computed": false,
|
||||
"key": {
|
||||
"type": "Identifier",
|
||||
@@ -293,6 +292,7 @@
|
||||
},
|
||||
"name": "a"
|
||||
},
|
||||
"shorthand": false,
|
||||
"value": {
|
||||
"type": "NumericLiteral",
|
||||
"start": 46,
|
||||
|
||||
@@ -237,7 +237,6 @@
|
||||
}
|
||||
},
|
||||
"method": false,
|
||||
"shorthand": false,
|
||||
"computed": false,
|
||||
"key": {
|
||||
"type": "Identifier",
|
||||
@@ -256,6 +255,7 @@
|
||||
},
|
||||
"name": "a"
|
||||
},
|
||||
"shorthand": false,
|
||||
"value": {
|
||||
"type": "NumericLiteral",
|
||||
"start": 49,
|
||||
|
||||
@@ -223,7 +223,6 @@
|
||||
}
|
||||
},
|
||||
"method": false,
|
||||
"shorthand": false,
|
||||
"computed": false,
|
||||
"key": {
|
||||
"type": "Identifier",
|
||||
@@ -242,6 +241,7 @@
|
||||
},
|
||||
"name": "a"
|
||||
},
|
||||
"shorthand": false,
|
||||
"value": {
|
||||
"type": "NumericLiteral",
|
||||
"start": 34,
|
||||
|
||||
@@ -253,7 +253,6 @@
|
||||
}
|
||||
},
|
||||
"method": false,
|
||||
"shorthand": false,
|
||||
"computed": false,
|
||||
"key": {
|
||||
"type": "Identifier",
|
||||
@@ -272,6 +271,7 @@
|
||||
},
|
||||
"name": "a"
|
||||
},
|
||||
"shorthand": false,
|
||||
"value": {
|
||||
"type": "NumericLiteral",
|
||||
"start": 43,
|
||||
|
||||
@@ -104,7 +104,6 @@
|
||||
}
|
||||
},
|
||||
"method": true,
|
||||
"shorthand": false,
|
||||
"computed": false,
|
||||
"key": {
|
||||
"type": "Identifier",
|
||||
@@ -289,7 +288,6 @@
|
||||
}
|
||||
},
|
||||
"method": false,
|
||||
"shorthand": false,
|
||||
"computed": false,
|
||||
"key": {
|
||||
"type": "Identifier",
|
||||
@@ -308,6 +306,7 @@
|
||||
},
|
||||
"name": "a"
|
||||
},
|
||||
"shorthand": false,
|
||||
"value": {
|
||||
"type": "NumericLiteral",
|
||||
"start": 41,
|
||||
|
||||
1
test/fixtures/experimental/dynamic-import/invalid-arguments-spread/actual.js
vendored
Normal file
1
test/fixtures/experimental/dynamic-import/invalid-arguments-spread/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import(...[1])
|
||||
3
test/fixtures/experimental/dynamic-import/invalid-arguments-spread/options.json
vendored
Normal file
3
test/fixtures/experimental/dynamic-import/invalid-arguments-spread/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"throws": "... is not allowed in import() (1:7)"
|
||||
}
|
||||
1
test/fixtures/experimental/export-extensions/default-type-with-flow/actual.js
vendored
Normal file
1
test/fixtures/experimental/export-extensions/default-type-with-flow/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export type from 'test';
|
||||
5
test/fixtures/experimental/export-extensions/default-type-with-flow/options.json
vendored
Normal file
5
test/fixtures/experimental/export-extensions/default-type-with-flow/options.json
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"plugins": ["exportExtensions", "flow"],
|
||||
"sourceType": "module",
|
||||
"throws": "Unexpected token, expected = (1:17)"
|
||||
}
|
||||
1
test/fixtures/experimental/export-extensions/default-type-without-flow/actual.js
vendored
Normal file
1
test/fixtures/experimental/export-extensions/default-type-without-flow/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export type from 'test';
|
||||
103
test/fixtures/experimental/export-extensions/default-type-without-flow/expected.json
vendored
Normal file
103
test/fixtures/experimental/export-extensions/default-type-without-flow/expected.json
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start": 0,
|
||||
"end": 24,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 24
|
||||
}
|
||||
},
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
"end": 24,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 24
|
||||
}
|
||||
},
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
"type": "ExportNamedDeclaration",
|
||||
"start": 0,
|
||||
"end": 24,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 24
|
||||
}
|
||||
},
|
||||
"specifiers": [
|
||||
{
|
||||
"type": "ExportDefaultSpecifier",
|
||||
"start": 7,
|
||||
"end": 11,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 7
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"exported": {
|
||||
"type": "Identifier",
|
||||
"start": 7,
|
||||
"end": 11,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 7
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 11
|
||||
},
|
||||
"identifierName": "type"
|
||||
},
|
||||
"name": "type"
|
||||
}
|
||||
}
|
||||
],
|
||||
"source": {
|
||||
"type": "StringLiteral",
|
||||
"start": 17,
|
||||
"end": 23,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 17
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"rawValue": "test",
|
||||
"raw": "'test'"
|
||||
},
|
||||
"value": "test"
|
||||
}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
1
test/fixtures/experimental/export-extensions/ns-default/actual.js
vendored
Normal file
1
test/fixtures/experimental/export-extensions/ns-default/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * as default from "foo";
|
||||
103
test/fixtures/experimental/export-extensions/ns-default/expected.json
vendored
Normal file
103
test/fixtures/experimental/export-extensions/ns-default/expected.json
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start": 0,
|
||||
"end": 31,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 31
|
||||
}
|
||||
},
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
"end": 31,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 31
|
||||
}
|
||||
},
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
"type": "ExportNamedDeclaration",
|
||||
"start": 0,
|
||||
"end": 31,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 31
|
||||
}
|
||||
},
|
||||
"specifiers": [
|
||||
{
|
||||
"type": "ExportNamespaceSpecifier",
|
||||
"start": 7,
|
||||
"end": 19,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 7
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 19
|
||||
}
|
||||
},
|
||||
"exported": {
|
||||
"type": "Identifier",
|
||||
"start": 12,
|
||||
"end": 19,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 12
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 19
|
||||
},
|
||||
"identifierName": "default"
|
||||
},
|
||||
"name": "default"
|
||||
}
|
||||
}
|
||||
],
|
||||
"source": {
|
||||
"type": "StringLiteral",
|
||||
"start": 25,
|
||||
"end": 30,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 25
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 30
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"rawValue": "foo",
|
||||
"raw": "\"foo\""
|
||||
},
|
||||
"value": "foo"
|
||||
}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-0/actual.js
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-0/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
1_
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-0/options.json
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-0/options.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{ "throws": "Invalid NumericLiteralSeparator (1:1)" }
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-1/actual.js
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-1/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
1_1_
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-1/options.json
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-1/options.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{ "throws": "Invalid NumericLiteralSeparator (1:3)" }
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-10/actual.js
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-10/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
0x1_1_
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-10/options.json
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-10/options.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{ "throws": "Invalid NumericLiteralSeparator (1:5)" }
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-11/actual.js
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-11/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
0xa_1_
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-11/options.json
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-11/options.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{ "throws": "Invalid NumericLiteralSeparator (1:5)" }
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-12/actual.js
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-12/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
0x_a_1
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-12/options.json
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-12/options.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{ "throws": "Invalid NumericLiteralSeparator (1:2)" }
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-13/actual.js
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-13/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
0x__1_1_
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-13/options.json
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-13/options.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{ "throws": "Invalid NumericLiteralSeparator (1:2)" }
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-14/actual.js
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-14/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
0x_1__1
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-14/options.json
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-14/options.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{ "throws": "Invalid NumericLiteralSeparator (1:2)" }
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-15/actual.js
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-15/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
0x_1_1_
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-15/options.json
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-15/options.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{ "throws": "Invalid NumericLiteralSeparator (1:2)" }
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-16/actual.js
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-16/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
0o_1_1
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-16/options.json
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-16/options.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{ "throws": "Invalid NumericLiteralSeparator (1:2)" }
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-17/actual.js
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-17/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
0o_11
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-17/options.json
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-17/options.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{ "throws": "Invalid NumericLiteralSeparator (1:2)" }
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-18/actual.js
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-18/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
0o_01_1_
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-18/options.json
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-18/options.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{ "throws": "Invalid NumericLiteralSeparator (1:2)" }
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-19/actual.js
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-19/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
0b_0_1_1
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-19/options.json
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-19/options.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{ "throws": "Invalid NumericLiteralSeparator (1:2)" }
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-2/actual.js
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-2/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
1_1__
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-2/options.json
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-2/options.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{ "throws": "Invalid NumericLiteralSeparator (1:3)" }
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-20/actual.js
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-20/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
0b_01_1_
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-20/options.json
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-20/options.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{ "throws": "Invalid NumericLiteralSeparator (1:2)" }
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-21/actual.js
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-21/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
0b01_1_
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-21/options.json
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-21/options.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{ "throws": "Invalid NumericLiteralSeparator (1:6)" }
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-22/actual.js
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-22/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
0o1_1_
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-22/options.json
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-22/options.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{ "throws": "Invalid NumericLiteralSeparator (1:5)" }
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-23/actual.js
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-23/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
0o_1_1_
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-23/options.json
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-23/options.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{ "throws": "Invalid NumericLiteralSeparator (1:2)" }
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-24/actual.js
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-24/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
._1_1
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-24/options.json
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-24/options.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{ "throws": "Unexpected token (1:0)" }
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-25/actual.js
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-25/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
0o01_8
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-25/options.json
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-25/options.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{ "throws": "Unexpected token, expected ; (1:5)" }
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-26/actual.js
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-26/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
0b2_1
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-26/options.json
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-26/options.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{ "throws": "Expected number in radix 2 (1:2)" }
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-27/actual.js
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-27/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
0xZ_1
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-27/options.json
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-27/options.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{ "throws": "Expected number in radix 16 (1:2)" }
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-3/actual.js
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-3/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
1__1
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-3/options.json
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-3/options.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{ "throws": "Invalid NumericLiteralSeparator (1:1)" }
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-4/actual.js
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-4/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
1_1_.1_1
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-4/options.json
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-4/options.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{ "throws": "Invalid NumericLiteralSeparator (1:3)" }
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-5/actual.js
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-5/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
1_1._1_1
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-5/options.json
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-5/options.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{ "throws": "Invalid NumericLiteralSeparator (1:4)" }
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-6/actual.js
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-6/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
1_1.1_e1
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-6/options.json
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-6/options.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{ "throws": "Invalid NumericLiteralSeparator (1:5)" }
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-7/actual.js
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-7/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
1_1.1_E1
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-7/options.json
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-7/options.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{ "throws": "Invalid NumericLiteralSeparator (1:5)" }
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-8/actual.js
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-8/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
1_1.1e_1
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-8/options.json
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-8/options.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{ "throws": "Invalid NumericLiteralSeparator (1:6)" }
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-9/actual.js
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-9/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
1_1.1E_1
|
||||
1
test/fixtures/experimental/numeric-literal-separator/invalid-9/options.json
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/invalid-9/options.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{ "throws": "Invalid NumericLiteralSeparator (1:6)" }
|
||||
3
test/fixtures/experimental/numeric-literal-separator/options.json
vendored
Normal file
3
test/fixtures/experimental/numeric-literal-separator/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"plugins": ["numericSeparator"]
|
||||
}
|
||||
1
test/fixtures/experimental/numeric-literal-separator/valid-0/actual.js
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/valid-0/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
1_1
|
||||
69
test/fixtures/experimental/numeric-literal-separator/valid-0/expected.json
vendored
Normal file
69
test/fixtures/experimental/numeric-literal-separator/valid-0/expected.json
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start": 0,
|
||||
"end": 3,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 3
|
||||
}
|
||||
},
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
"end": 3,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 3
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"body": [
|
||||
{
|
||||
"type": "ExpressionStatement",
|
||||
"start": 0,
|
||||
"end": 3,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 3
|
||||
}
|
||||
},
|
||||
"expression": {
|
||||
"type": "NumericLiteral",
|
||||
"start": 0,
|
||||
"end": 3,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 3
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"rawValue": 11,
|
||||
"raw": "1_1"
|
||||
},
|
||||
"value": 11
|
||||
}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
1
test/fixtures/experimental/numeric-literal-separator/valid-1/actual.js
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/valid-1/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
1_1.1_1
|
||||
69
test/fixtures/experimental/numeric-literal-separator/valid-1/expected.json
vendored
Normal file
69
test/fixtures/experimental/numeric-literal-separator/valid-1/expected.json
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start": 0,
|
||||
"end": 7,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 7
|
||||
}
|
||||
},
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
"end": 7,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 7
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"body": [
|
||||
{
|
||||
"type": "ExpressionStatement",
|
||||
"start": 0,
|
||||
"end": 7,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 7
|
||||
}
|
||||
},
|
||||
"expression": {
|
||||
"type": "NumericLiteral",
|
||||
"start": 0,
|
||||
"end": 7,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 7
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"rawValue": 11.11,
|
||||
"raw": "1_1.1_1"
|
||||
},
|
||||
"value": 11.11
|
||||
}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
1
test/fixtures/experimental/numeric-literal-separator/valid-10/actual.js
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/valid-10/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
0o1_1
|
||||
69
test/fixtures/experimental/numeric-literal-separator/valid-10/expected.json
vendored
Normal file
69
test/fixtures/experimental/numeric-literal-separator/valid-10/expected.json
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start": 0,
|
||||
"end": 5,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 5
|
||||
}
|
||||
},
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
"end": 5,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 5
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"body": [
|
||||
{
|
||||
"type": "ExpressionStatement",
|
||||
"start": 0,
|
||||
"end": 5,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 5
|
||||
}
|
||||
},
|
||||
"expression": {
|
||||
"type": "NumericLiteral",
|
||||
"start": 0,
|
||||
"end": 5,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 5
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"rawValue": 9,
|
||||
"raw": "0o1_1"
|
||||
},
|
||||
"value": 9
|
||||
}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
1
test/fixtures/experimental/numeric-literal-separator/valid-11/actual.js
vendored
Normal file
1
test/fixtures/experimental/numeric-literal-separator/valid-11/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
0o0_11
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user