forked from babel/babel
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ac74743
commit 30658c6
Showing
41 changed files
with
581 additions
and
15 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
packages/babel-parser/test/fixtures/flow/type-annotations/46-babel-7/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
a = class Foo<T> extends Bar<T> { } |
3 changes: 3 additions & 0 deletions
3
packages/babel-parser/test/fixtures/flow/type-annotations/46-babel-7/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"BABEL_8_BREAKING": false | ||
} |
77 changes: 77 additions & 0 deletions
77
packages/babel-parser/test/fixtures/flow/type-annotations/46-babel-7/output.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/babel-parser/test/fixtures/flow/type-annotations/46/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"BABEL_8_BREAKING": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/babel-parser/test/fixtures/flow/type-annotations/48-babel-7/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
class Foo<T> extends Bar<T> { } |
3 changes: 3 additions & 0 deletions
3
packages/babel-parser/test/fixtures/flow/type-annotations/48-babel-7/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"BABEL_8_BREAKING": false | ||
} |
63 changes: 63 additions & 0 deletions
63
packages/babel-parser/test/fixtures/flow/type-annotations/48-babel-7/output.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/babel-parser/test/fixtures/flow/type-annotations/48/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"BABEL_8_BREAKING": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
packages/babel-parser/test/fixtures/typescript/class/expression-extends-babel-7/input.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
(class extends f()<T> {}); | ||
(class C extends f()<T> {}); |
3 changes: 3 additions & 0 deletions
3
packages/babel-parser/test/fixtures/typescript/class/expression-extends-babel-7/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"BABEL_8_BREAKING": false | ||
} |
106 changes: 106 additions & 0 deletions
106
packages/babel-parser/test/fixtures/typescript/class/expression-extends-babel-7/output.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...-parser/test/fixtures/typescript/class/expression-extends-implements-babel-7/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"BABEL_8_BREAKING": false | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...es/babel-parser/test/fixtures/typescript/class/expression-extends-implements/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"BABEL_8_BREAKING": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
packages/babel-parser/test/fixtures/typescript/class/expression-extends/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"BABEL_8_BREAKING": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/babel-parser/test/fixtures/typescript/class/extends-babel-7/input.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
class C extends f()<T> {} |
3 changes: 3 additions & 0 deletions
3
packages/babel-parser/test/fixtures/typescript/class/extends-babel-7/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"BABEL_8_BREAKING": false | ||
} |
Oops, something went wrong.