mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
initial revision of reachability checks in binder
This commit is contained in:
@@ -446,7 +446,7 @@ namespace ts.BreakpointResolver {
|
||||
// fall through.
|
||||
|
||||
case SyntaxKind.CatchClause:
|
||||
return spanInNode(lastOrUndefined((<Block>node.parent).statements));;
|
||||
return spanInNode(lastOrUndefined((<Block>node.parent).statements));
|
||||
|
||||
case SyntaxKind.CaseBlock:
|
||||
// breakpoint in last statement of the last clause
|
||||
@@ -493,9 +493,6 @@ namespace ts.BreakpointResolver {
|
||||
default:
|
||||
return spanInNode(node.parent);
|
||||
}
|
||||
|
||||
// Default to parent node
|
||||
return spanInNode(node.parent);
|
||||
}
|
||||
|
||||
function spanInColonToken(node: Node): TextSpan {
|
||||
|
||||
@@ -340,7 +340,6 @@ namespace ts.formatting {
|
||||
return node;
|
||||
}
|
||||
}
|
||||
return node;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,9 @@ namespace ts.NavigateTo {
|
||||
let patternMatcher = createPatternMatcher(searchValue);
|
||||
let rawItems: RawNavigateToItem[] = [];
|
||||
|
||||
// This means "compare in a case insensitive manner."
|
||||
let baseSensitivity: Intl.CollatorOptions = { sensitivity: "base" };
|
||||
|
||||
// Search the declarations in all files and output matched NavigateToItem into array of NavigateToItem[]
|
||||
forEach(program.getSourceFiles(), sourceFile => {
|
||||
cancellationToken.throwIfCancellationRequested();
|
||||
@@ -162,8 +165,6 @@ namespace ts.NavigateTo {
|
||||
return bestMatchKind;
|
||||
}
|
||||
|
||||
// This means "compare in a case insensitive manner."
|
||||
let baseSensitivity: Intl.CollatorOptions = { sensitivity: "base" };
|
||||
function compareNavigateToItems(i1: RawNavigateToItem, i2: RawNavigateToItem) {
|
||||
// TODO(cyrusn): get the gamut of comparisons that VS already uses here.
|
||||
// Right now we just sort by kind first, and then by name of the item.
|
||||
|
||||
@@ -4863,7 +4863,7 @@ namespace ts {
|
||||
else if (!isFunctionLike(node)) {
|
||||
forEachChild(node, aggregate);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4910,7 +4910,7 @@ namespace ts {
|
||||
else if (!isFunctionLike(node)) {
|
||||
forEachChild(node, aggregate);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function ownsBreakOrContinueStatement(owner: Node, statement: BreakOrContinueStatement): boolean {
|
||||
@@ -6219,8 +6219,6 @@ namespace ts {
|
||||
}
|
||||
|
||||
return SemanticMeaning.Value | SemanticMeaning.Type | SemanticMeaning.Namespace;
|
||||
|
||||
Debug.fail("Unknown declaration type");
|
||||
}
|
||||
|
||||
function isTypeReference(node: Node): boolean {
|
||||
|
||||
@@ -320,7 +320,6 @@ namespace ts {
|
||||
// TODO: should this be '==='?
|
||||
if (settingsJson == null || settingsJson == "") {
|
||||
throw Error("LanguageServiceShimHostAdapter.getCompilationSettings: empty compilationSettings");
|
||||
return null;
|
||||
}
|
||||
return <CompilerOptions>JSON.parse(settingsJson);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user