Fix Flow.

Removed `@flow` annotation from files that don't actually pass Flow check at the moment. These will be added back file by file once the files are properly converted to use Flow.

Closes #3064
This commit is contained in:
Daniel Lo Nigro 2015-11-15 21:29:59 -08:00
parent a3fe3933da
commit 20a483cd58
16 changed files with 2 additions and 32 deletions

View File

@ -1,5 +1,3 @@
/* @flow */
import Parser, { plugins } from "./parser";
import "./parser/util";
import "./parser/statement";

View File

@ -1,5 +1,3 @@
/* @flow */
// A second optional argument can be given to further configure
// the parser process. These options are recognized:

View File

@ -1,5 +1,3 @@
/* @flow */
// A recursive descent parser operates by defining functions for all
// syntactic elements, and recursively calling those, each function
// advancing the input stream and returning an AST node. Precedence
@ -135,7 +133,7 @@ pp.parseMaybeAssign = function (noIn, refShorthandDefaultPos, afterLeftParse) {
} else if (failOnShorthandAssign && refShorthandDefaultPos.start) {
this.unexpected(refShorthandDefaultPos.start);
}
return left;
};

View File

@ -1,5 +1,3 @@
/* @flow */
import { reservedWords } from "../util/identifier";
import { getOptions } from "../options";
import Tokenizer from "../tokenizer";

View File

@ -1,5 +1,3 @@
/* @flow */
import { getLineInfo } from "../util/location";
import Parser from "./index";

View File

@ -1,5 +1,3 @@
/* @flow */
import { types as tt } from "../tokenizer/types";
import Parser from "./index";
import { reservedWords } from "../util/identifier";

View File

@ -1,5 +1,3 @@
/* @flow */
import Parser from "./index";
import { SourceLocation } from "../util/location";

View File

@ -1,5 +1,3 @@
/* @flow */
import { types as tt } from "../tokenizer/types";
import Parser from "./index";
import { lineBreak } from "../util/whitespace";

View File

@ -1,5 +1,3 @@
/* @flow */
import { types as tt } from "../tokenizer/types";
import Parser from "../parser";

View File

@ -1,5 +1,3 @@
/* @flow */
import XHTMLEntities from "./xhtml";
import { TokenType, types as tt } from "../../tokenizer/types";
import { TokContext, types as tc } from "../../tokenizer/context";

View File

@ -1,5 +1,3 @@
/* @flow */
import type { TokenType } from "./types";
import { isIdentifierStart, isIdentifierChar, isKeyword } from "../util/identifier";
import { types as tt, keywords as keywordTypes } from "./types";

View File

@ -1,5 +1,3 @@
/* @flow */
import type { TokContext } from "./context";
import type { Token } from "./index";
import { Position } from "../util/location";

View File

@ -1,5 +1,3 @@
/* @flow */
// ## Token types
// The assignment of fine-grained, information-carrying type objects

View File

@ -1,5 +1,3 @@
/* @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

View File

@ -1,5 +1,3 @@
/* @flow */
import { lineBreakG } from "./whitespace";
// These are used when `options.locations` is on, for the

View File

@ -6,7 +6,7 @@
export const lineBreak = /\r\n?|\n|\u2028|\u2029/;
export const lineBreakG = new RegExp(lineBreak.source, "g");
export function isNewLine(code) {
export function isNewLine(code: number): boolean {
return code === 10 || code === 13 || code === 0x2028 || code === 0x2029;
}