From 888b9f6940925d2e9a0cc06f7dd3a0861c54b4f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Sat, 25 May 2019 08:46:01 +0200 Subject: [PATCH] Remove unused code in the TS parser plugin (#10025) --- .../src/plugins/typescript/index.js | 28 ------------------- 1 file changed, 28 deletions(-) diff --git a/packages/babel-parser/src/plugins/typescript/index.js b/packages/babel-parser/src/plugins/typescript/index.js index 8e846d8cb5..fb6e8363a3 100644 --- a/packages/babel-parser/src/plugins/typescript/index.js +++ b/packages/babel-parser/src/plugins/typescript/index.js @@ -161,17 +161,6 @@ export default (superClass: Class): Class => ); } - tsTryParseDelimitedList( - kind: ParsingContext, - parseElement: () => ?T, - ): ?(T[]) { - return this.tsParseDelimitedListWorker( - kind, - parseElement, - /* expectSuccess */ false, - ); - } - /** * If !expectSuccess, returns undefined instead of failing to parse. * If expectSuccess, parseElement should always return a defined value. @@ -1270,23 +1259,6 @@ export default (superClass: Class): Class => } } - nodeWithSamePosition(original: N.Node, type: string): T { - const node = this.startNodeAtNode(original); - node.type = type; - node.end = original.end; - node.loc.end = original.loc.end; - - if (original.leadingComments) { - node.leadingComments = original.leadingComments; - } - if (original.trailingComments) { - node.trailingComments = original.trailingComments; - } - if (original.innerComments) node.innerComments = original.innerComments; - - return node; - } - tsTryParseDeclare(nany: any): ?N.Declaration { if (this.isLineTerminator()) { return;