Skip to content

Commit

Permalink
Split Babel 7/8 fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Dec 6, 2024
1 parent ac74743 commit 30658c6
Show file tree
Hide file tree
Showing 41 changed files with 581 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a = class Foo<T> extends Bar<T> { }
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"BABEL_8_BREAKING": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"type": "File",
"start":0,"end":35,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":35,"index":35}},
"program": {
"type": "Program",
"start":0,"end":35,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":35,"index":35}},
"sourceType": "module",
"interpreter": null,
"body": [
{
"type": "ExpressionStatement",
"start":0,"end":35,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":35,"index":35}},
"expression": {
"type": "AssignmentExpression",
"start":0,"end":35,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":35,"index":35}},
"operator": "=",
"left": {
"type": "Identifier",
"start":0,"end":1,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":1,"index":1},"identifierName":"a"},
"name": "a"
},
"right": {
"type": "ClassExpression",
"start":4,"end":35,"loc":{"start":{"line":1,"column":4,"index":4},"end":{"line":1,"column":35,"index":35}},
"id": {
"type": "Identifier",
"start":10,"end":13,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":1,"column":13,"index":13},"identifierName":"Foo"},
"name": "Foo"
},
"typeParameters": {
"type": "TypeParameterDeclaration",
"start":13,"end":16,"loc":{"start":{"line":1,"column":13,"index":13},"end":{"line":1,"column":16,"index":16}},
"params": [
{
"type": "TypeParameter",
"start":14,"end":15,"loc":{"start":{"line":1,"column":14,"index":14},"end":{"line":1,"column":15,"index":15}},
"name": "T",
"variance": null
}
]
},
"superClass": {
"type": "Identifier",
"start":25,"end":28,"loc":{"start":{"line":1,"column":25,"index":25},"end":{"line":1,"column":28,"index":28},"identifierName":"Bar"},
"name": "Bar"
},
"superTypeParameters": {
"type": "TypeParameterInstantiation",
"start":28,"end":31,"loc":{"start":{"line":1,"column":28,"index":28},"end":{"line":1,"column":31,"index":31}},
"params": [
{
"type": "GenericTypeAnnotation",
"start":29,"end":30,"loc":{"start":{"line":1,"column":29,"index":29},"end":{"line":1,"column":30,"index":30}},
"typeParameters": null,
"id": {
"type": "Identifier",
"start":29,"end":30,"loc":{"start":{"line":1,"column":29,"index":29},"end":{"line":1,"column":30,"index":30},"identifierName":"T"},
"name": "T"
}
}
]
},
"body": {
"type": "ClassBody",
"start":32,"end":35,"loc":{"start":{"line":1,"column":32,"index":32},"end":{"line":1,"column":35,"index":35}},
"body": []
}
}
}
}
],
"directives": [],
"extra": {
"topLevelAwait": false
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"BABEL_8_BREAKING": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"start":25,"end":28,"loc":{"start":{"line":1,"column":25,"index":25},"end":{"line":1,"column":28,"index":28},"identifierName":"Bar"},
"name": "Bar"
},
"superTypeParameters": {
"superTypeArguments": {
"type": "TypeParameterInstantiation",
"start":28,"end":31,"loc":{"start":{"line":1,"column":28,"index":28},"end":{"line":1,"column":31,"index":31}},
"params": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
class Foo<T> extends Bar<T> { }
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"BABEL_8_BREAKING": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"type": "File",
"start":0,"end":31,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":31,"index":31}},
"program": {
"type": "Program",
"start":0,"end":31,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":31,"index":31}},
"sourceType": "module",
"interpreter": null,
"body": [
{
"type": "ClassDeclaration",
"start":0,"end":31,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":31,"index":31}},
"id": {
"type": "Identifier",
"start":6,"end":9,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":1,"column":9,"index":9},"identifierName":"Foo"},
"name": "Foo"
},
"typeParameters": {
"type": "TypeParameterDeclaration",
"start":9,"end":12,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":12,"index":12}},
"params": [
{
"type": "TypeParameter",
"start":10,"end":11,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":1,"column":11,"index":11}},
"name": "T",
"variance": null
}
]
},
"superClass": {
"type": "Identifier",
"start":21,"end":24,"loc":{"start":{"line":1,"column":21,"index":21},"end":{"line":1,"column":24,"index":24},"identifierName":"Bar"},
"name": "Bar"
},
"superTypeParameters": {
"type": "TypeParameterInstantiation",
"start":24,"end":27,"loc":{"start":{"line":1,"column":24,"index":24},"end":{"line":1,"column":27,"index":27}},
"params": [
{
"type": "GenericTypeAnnotation",
"start":25,"end":26,"loc":{"start":{"line":1,"column":25,"index":25},"end":{"line":1,"column":26,"index":26}},
"typeParameters": null,
"id": {
"type": "Identifier",
"start":25,"end":26,"loc":{"start":{"line":1,"column":25,"index":25},"end":{"line":1,"column":26,"index":26},"identifierName":"T"},
"name": "T"
}
}
]
},
"body": {
"type": "ClassBody",
"start":28,"end":31,"loc":{"start":{"line":1,"column":28,"index":28},"end":{"line":1,"column":31,"index":31}},
"body": []
}
}
],
"directives": [],
"extra": {
"topLevelAwait": false
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"BABEL_8_BREAKING": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"start":21,"end":24,"loc":{"start":{"line":1,"column":21,"index":21},"end":{"line":1,"column":24,"index":24},"identifierName":"Bar"},
"name": "Bar"
},
"superTypeParameters": {
"superTypeArguments": {
"type": "TypeParameterInstantiation",
"start":24,"end":27,"loc":{"start":{"line":1,"column":24,"index":24},"end":{"line":1,"column":27,"index":27}},
"params": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
(class extends f()<T> {});
(class C extends f()<T> {});
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"BABEL_8_BREAKING": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
{
"type": "File",
"start":0,"end":55,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":28,"index":55}},
"program": {
"type": "Program",
"start":0,"end":55,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":28,"index":55}},
"sourceType": "module",
"interpreter": null,
"body": [
{
"type": "ExpressionStatement",
"start":0,"end":26,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":26,"index":26}},
"expression": {
"type": "ClassExpression",
"start":1,"end":24,"loc":{"start":{"line":1,"column":1,"index":1},"end":{"line":1,"column":24,"index":24}},
"id": null,
"superClass": {
"type": "CallExpression",
"start":15,"end":18,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":1,"column":18,"index":18}},
"callee": {
"type": "Identifier",
"start":15,"end":16,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":1,"column":16,"index":16},"identifierName":"f"},
"name": "f"
},
"arguments": []
},
"superTypeParameters": {
"type": "TSTypeParameterInstantiation",
"start":18,"end":21,"loc":{"start":{"line":1,"column":18,"index":18},"end":{"line":1,"column":21,"index":21}},
"params": [
{
"type": "TSTypeReference",
"start":19,"end":20,"loc":{"start":{"line":1,"column":19,"index":19},"end":{"line":1,"column":20,"index":20}},
"typeName": {
"type": "Identifier",
"start":19,"end":20,"loc":{"start":{"line":1,"column":19,"index":19},"end":{"line":1,"column":20,"index":20},"identifierName":"T"},
"name": "T"
}
}
]
},
"body": {
"type": "ClassBody",
"start":22,"end":24,"loc":{"start":{"line":1,"column":22,"index":22},"end":{"line":1,"column":24,"index":24}},
"body": []
},
"extra": {
"parenthesized": true,
"parenStart": 0
}
}
},
{
"type": "ExpressionStatement",
"start":27,"end":55,"loc":{"start":{"line":2,"column":0,"index":27},"end":{"line":2,"column":28,"index":55}},
"expression": {
"type": "ClassExpression",
"start":28,"end":53,"loc":{"start":{"line":2,"column":1,"index":28},"end":{"line":2,"column":26,"index":53}},
"id": {
"type": "Identifier",
"start":34,"end":35,"loc":{"start":{"line":2,"column":7,"index":34},"end":{"line":2,"column":8,"index":35},"identifierName":"C"},
"name": "C"
},
"superClass": {
"type": "CallExpression",
"start":44,"end":47,"loc":{"start":{"line":2,"column":17,"index":44},"end":{"line":2,"column":20,"index":47}},
"callee": {
"type": "Identifier",
"start":44,"end":45,"loc":{"start":{"line":2,"column":17,"index":44},"end":{"line":2,"column":18,"index":45},"identifierName":"f"},
"name": "f"
},
"arguments": []
},
"superTypeParameters": {
"type": "TSTypeParameterInstantiation",
"start":47,"end":50,"loc":{"start":{"line":2,"column":20,"index":47},"end":{"line":2,"column":23,"index":50}},
"params": [
{
"type": "TSTypeReference",
"start":48,"end":49,"loc":{"start":{"line":2,"column":21,"index":48},"end":{"line":2,"column":22,"index":49}},
"typeName": {
"type": "Identifier",
"start":48,"end":49,"loc":{"start":{"line":2,"column":21,"index":48},"end":{"line":2,"column":22,"index":49},"identifierName":"T"},
"name": "T"
}
}
]
},
"body": {
"type": "ClassBody",
"start":51,"end":53,"loc":{"start":{"line":2,"column":24,"index":51},"end":{"line":2,"column":26,"index":53}},
"body": []
},
"extra": {
"parenthesized": true,
"parenStart": 27
}
}
}
],
"directives": [],
"extra": {
"topLevelAwait": false
}
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"BABEL_8_BREAKING": false
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"BABEL_8_BREAKING": true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"arguments": []
},
"superTypeParameters": {
"superTypeArguments": {
"type": "TSTypeParameterInstantiation",
"start":18,"end":21,"loc":{"start":{"line":1,"column":18,"index":18},"end":{"line":1,"column":21,"index":21}},
"params": [
Expand Down Expand Up @@ -106,7 +106,7 @@
},
"arguments": []
},
"superTypeParameters": {
"superTypeArguments": {
"type": "TSTypeParameterInstantiation",
"start":65,"end":68,"loc":{"start":{"line":2,"column":20,"index":65},"end":{"line":2,"column":23,"index":68}},
"params": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"BABEL_8_BREAKING": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"arguments": []
},
"superTypeParameters": {
"superTypeArguments": {
"type": "TSTypeParameterInstantiation",
"start":18,"end":21,"loc":{"start":{"line":1,"column":18,"index":18},"end":{"line":1,"column":21,"index":21}},
"params": [
Expand Down Expand Up @@ -71,7 +71,7 @@
},
"arguments": []
},
"superTypeParameters": {
"superTypeArguments": {
"type": "TSTypeParameterInstantiation",
"start":47,"end":50,"loc":{"start":{"line":2,"column":20,"index":47},"end":{"line":2,"column":23,"index":50}},
"params": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
class C extends f()<T> {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"BABEL_8_BREAKING": false
}
Loading

0 comments on commit 30658c6

Please sign in to comment.