From ef31a148a6d4fcacb566065d0a819fd3db2c9c63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Fri, 8 Sep 2017 12:52:02 +0200 Subject: [PATCH 1/2] Remove outdated comment The described code was removed in 5f1c3c3b8de7b6f450d4a6b005e689c3f04477b0 (2 years ago!) --- src/util/identifier.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/util/identifier.js b/src/util/identifier.js index 1552410e23..c938eb9d5e 100644 --- a/src/util/identifier.js +++ b/src/util/identifier.js @@ -2,15 +2,6 @@ // @flow -// This is a trick taken from Esprima. It turns out that, on -// non-Chrome browsers, to check whether a string is in a set, a -// predicate containing a big ugly `switch` statement is faster than -// a regular expression, and on Chrome the two are about on par. -// This function uses `eval` (non-lexical) to produce such a -// predicate from a space-separated string of words. -// -// It starts by sorting the words by length. - function makePredicate(words: string): (str: string) => boolean { const wordsArr = words.split(" "); return function(str) { From b97c534b3235e093f2205c81968df04138b5aa1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Fri, 8 Sep 2017 15:24:46 +0200 Subject: [PATCH 2/2] Remove outdated imports They were not needed since c4fb3fe742c61ee2dd0ab1b1197a254d3c9f6a55 because now each files declare a new class instead of adding method to the existing one. --- src/index.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/index.js b/src/index.js index 7a59f52e90..882834dd47 100755 --- a/src/index.js +++ b/src/index.js @@ -2,16 +2,8 @@ import type { Options } from "./options"; import Parser, { plugins } from "./parser"; -import "./parser/util"; -import "./parser/statement"; -import "./parser/lval"; -import "./parser/expression"; -import "./parser/node"; -import "./parser/location"; -import "./parser/comments"; import { types as tokTypes } from "./tokenizer/types"; -import "./tokenizer"; import "./tokenizer/context"; import type { Expression, File } from "./types";