Use full spans in the classifier. Non-full spans are very expensive to compute.

This commit is contained in:
Cyrus Najmabadi 2015-06-10 17:28:58 -07:00
parent d49fe6ab53
commit 3a96923061

View file

@ -6046,8 +6046,8 @@ module ts {
function processNode(node: Node) {
// Only walk into nodes that intersect the requested span.
if (node && textSpanIntersectsWith(span, node.getStart(), node.getWidth())) {
if (node.kind === SyntaxKind.Identifier && node.getWidth() > 0) {
if (node && textSpanIntersectsWith(span, node.getFullStart(), node.getFullWidth())) {
if (node.kind === SyntaxKind.Identifier && !nodeIsMissing(node)) {
let symbol = typeChecker.getSymbolAtLocation(node);
if (symbol) {
let type = classifySymbol(symbol, getMeaningFromLocation(node));