From cc97a4dd2a967e1c2273bd5f4c5f49a5bf2e2585 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 27 Mar 2019 21:01:33 +0100 Subject: remove node_modules --- node_modules/acorn-dynamic-import/src/index.js | 4 -- node_modules/acorn-dynamic-import/src/inject.js | 52 ------------------------- 2 files changed, 56 deletions(-) delete mode 100644 node_modules/acorn-dynamic-import/src/index.js delete mode 100644 node_modules/acorn-dynamic-import/src/inject.js (limited to 'node_modules/acorn-dynamic-import/src') diff --git a/node_modules/acorn-dynamic-import/src/index.js b/node_modules/acorn-dynamic-import/src/index.js deleted file mode 100644 index 6eb1d4140..000000000 --- a/node_modules/acorn-dynamic-import/src/index.js +++ /dev/null @@ -1,4 +0,0 @@ -import * as acorn from 'acorn'; -import inject from './inject'; - -export default inject(acorn); diff --git a/node_modules/acorn-dynamic-import/src/inject.js b/node_modules/acorn-dynamic-import/src/inject.js deleted file mode 100644 index 796d87db5..000000000 --- a/node_modules/acorn-dynamic-import/src/inject.js +++ /dev/null @@ -1,52 +0,0 @@ -/* eslint-disable no-underscore-dangle */ - -export const DynamicImportKey = 'Import'; - -export default function injectDynamicImport(acorn) { - const tt = acorn.tokTypes; - - // NOTE: This allows `yield import()` to parse correctly. - tt._import.startsExpr = true; - - function parseDynamicImport() { - const node = this.startNode(); - this.next(); - if (this.type !== tt.parenL) { - this.unexpected(); - } - return this.finishNode(node, DynamicImportKey); - } - - function peekNext() { - return this.input[this.pos]; - } - - // eslint-disable-next-line no-param-reassign - acorn.plugins.dynamicImport = function dynamicImportPlugin(instance) { - instance.extend('parseStatement', nextMethod => ( - function parseStatement(...args) { - const node = this.startNode(); - if (this.type === tt._import) { - const nextToken = peekNext.call(this); - if (nextToken === tt.parenL.label) { - const expr = this.parseExpression(); - return this.parseExpressionStatement(node, expr); - } - } - - return nextMethod.apply(this, args); - } - )); - - instance.extend('parseExprAtom', nextMethod => ( - function parseExprAtom(refDestructuringErrors) { - if (this.type === tt._import) { - return parseDynamicImport.call(this); - } - return nextMethod.call(this, refDestructuringErrors); - } - )); - }; - - return acorn; -} -- cgit v1.2.3