Make enum private and fix fillSignature predicate
This commit is contained in:
parent
3638ff19b3
commit
8856ddfd15
|
@ -2,6 +2,13 @@
|
||||||
/// <reference path="scanner.ts"/>
|
/// <reference path="scanner.ts"/>
|
||||||
|
|
||||||
namespace ts {
|
namespace ts {
|
||||||
|
const enum SignatureContext {
|
||||||
|
Yield = 1 << 0,
|
||||||
|
Await = 1 << 1,
|
||||||
|
Type = 1 << 2,
|
||||||
|
RequireCompleteParameterList = 1 << 3,
|
||||||
|
}
|
||||||
|
|
||||||
let NodeConstructor: new (kind: SyntaxKind, pos: number, end: number) => Node;
|
let NodeConstructor: new (kind: SyntaxKind, pos: number, end: number) => Node;
|
||||||
let TokenConstructor: new (kind: SyntaxKind, pos: number, end: number) => Node;
|
let TokenConstructor: new (kind: SyntaxKind, pos: number, end: number) => Node;
|
||||||
let IdentifierConstructor: new (kind: SyntaxKind, pos: number, end: number) => Node;
|
let IdentifierConstructor: new (kind: SyntaxKind, pos: number, end: number) => Node;
|
||||||
|
@ -2231,7 +2238,7 @@ namespace ts {
|
||||||
else if (parseOptional(returnToken)) {
|
else if (parseOptional(returnToken)) {
|
||||||
signature.type = parseTypeOrTypePredicate();
|
signature.type = parseTypeOrTypePredicate();
|
||||||
}
|
}
|
||||||
else if (context === SignatureContext.Type) {
|
else if (context & SignatureContext.Type) {
|
||||||
const start = scanner.getTokenPos();
|
const start = scanner.getTokenPos();
|
||||||
const length = scanner.getTextPos() - start;
|
const length = scanner.getTextPos() - start;
|
||||||
const backwardToken = parseOptional(returnToken === SyntaxKind.ColonToken ? SyntaxKind.EqualsGreaterThanToken : SyntaxKind.ColonToken);
|
const backwardToken = parseOptional(returnToken === SyntaxKind.ColonToken ? SyntaxKind.EqualsGreaterThanToken : SyntaxKind.ColonToken);
|
||||||
|
|
|
@ -36,13 +36,6 @@ namespace ts {
|
||||||
end: number;
|
end: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const enum SignatureContext {
|
|
||||||
Yield = 1 << 1,
|
|
||||||
Await = 1 << 2,
|
|
||||||
Type = 1 << 3,
|
|
||||||
RequireCompleteParameterList = 1 << 4,
|
|
||||||
}
|
|
||||||
|
|
||||||
// token > SyntaxKind.Identifer => token is a keyword
|
// token > SyntaxKind.Identifer => token is a keyword
|
||||||
// Also, If you add a new SyntaxKind be sure to keep the `Markers` section at the bottom in sync
|
// Also, If you add a new SyntaxKind be sure to keep the `Markers` section at the bottom in sync
|
||||||
export const enum SyntaxKind {
|
export const enum SyntaxKind {
|
||||||
|
|
Loading…
Reference in a new issue