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:
parent
a3fe3933da
commit
20a483cd58
@ -1,5 +1,3 @@
|
||||
/* @flow */
|
||||
|
||||
import Parser, { plugins } from "./parser";
|
||||
import "./parser/util";
|
||||
import "./parser/statement";
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
/* @flow */
|
||||
|
||||
// A second optional argument can be given to further configure
|
||||
// the parser process. These options are recognized:
|
||||
|
||||
|
||||
@ -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;
|
||||
};
|
||||
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
/* @flow */
|
||||
|
||||
import { reservedWords } from "../util/identifier";
|
||||
import { getOptions } from "../options";
|
||||
import Tokenizer from "../tokenizer";
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
/* @flow */
|
||||
|
||||
import { getLineInfo } from "../util/location";
|
||||
import Parser from "./index";
|
||||
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
/* @flow */
|
||||
|
||||
import { types as tt } from "../tokenizer/types";
|
||||
import Parser from "./index";
|
||||
import { reservedWords } from "../util/identifier";
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
/* @flow */
|
||||
|
||||
import Parser from "./index";
|
||||
import { SourceLocation } from "../util/location";
|
||||
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
/* @flow */
|
||||
|
||||
import { types as tt } from "../tokenizer/types";
|
||||
import Parser from "./index";
|
||||
import { lineBreak } from "../util/whitespace";
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
/* @flow */
|
||||
|
||||
import { types as tt } from "../tokenizer/types";
|
||||
import Parser from "../parser";
|
||||
|
||||
|
||||
@ -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";
|
||||
|
||||
@ -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";
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
/* @flow */
|
||||
|
||||
import type { TokContext } from "./context";
|
||||
import type { Token } from "./index";
|
||||
import { Position } from "../util/location";
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
/* @flow */
|
||||
|
||||
// ## Token types
|
||||
|
||||
// The assignment of fine-grained, information-carrying type objects
|
||||
|
||||
@ -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
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
/* @flow */
|
||||
|
||||
import { lineBreakG } from "./whitespace";
|
||||
|
||||
// These are used when `options.locations` is on, for the
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user