Merge pull request #715 from nicolo-ribaudo/makePredicate-comment

Remove outdated code
This commit is contained in:
Brian Ng 2017-09-08 09:56:16 -05:00 committed by GitHub
commit e8c533ba68
2 changed files with 0 additions and 17 deletions

View File

@ -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";

View File

@ -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) {