refactor: split locationParser into ParserErrors and error message (#11653)

This commit is contained in:
Huáng Jùnliàng
2020-05-30 15:05:42 -04:00
committed by GitHub
parent 15d6da076a
commit b5c4a46a69
13 changed files with 82 additions and 78 deletions

View File

@@ -6,7 +6,7 @@ import type { ExpressionErrors } from "../parser/util";
import * as N from "../types";
import type { Position } from "../util/location";
import { type BindingTypes, BIND_NONE } from "../util/scopeflags";
import { Errors } from "../parser/location";
import { Errors } from "../parser/error";
function isSimpleProperty(node: N.Node): boolean {
return (

View File

@@ -22,7 +22,7 @@ import {
SCOPE_OTHER,
} from "../util/scopeflags";
import type { ExpressionErrors } from "../parser/util";
import { Errors } from "../parser/location";
import { Errors } from "../parser/error";
const reservedTypes = new Set([
"_",

View File

@@ -11,7 +11,7 @@ import * as N from "../../types";
import { isIdentifierChar, isIdentifierStart } from "../../util/identifier";
import type { Position } from "../../util/location";
import { isNewLine } from "../../util/whitespace";
import { Errors } from "../../parser/location";
import { Errors } from "../../parser/error";
const HEX_NUMBER = /^[\da-fA-F]+$/;
const DECIMAL_NUMBER = /^\d+$/;

View File

@@ -27,7 +27,7 @@ import TypeScriptScopeHandler from "./scope";
import * as charCodes from "charcodes";
import type { ExpressionErrors } from "../../parser/util";
import { PARAM } from "../../util/production-parameter";
import { Errors } from "../../parser/location";
import { Errors } from "../../parser/error";
type TsModifier =
| "readonly"