Merge pull request #3474 from Microsoft/classificationPerf
Use full spans in the classifier. Non-full spans are very expensive to compute.
This commit is contained in:
commit
29fcd4aa90
1 changed files with 2 additions and 2 deletions
|
@ -6046,8 +6046,8 @@ module ts {
|
||||||
|
|
||||||
function processNode(node: Node) {
|
function processNode(node: Node) {
|
||||||
// Only walk into nodes that intersect the requested span.
|
// Only walk into nodes that intersect the requested span.
|
||||||
if (node && textSpanIntersectsWith(span, node.getStart(), node.getWidth())) {
|
if (node && textSpanIntersectsWith(span, node.getFullStart(), node.getFullWidth())) {
|
||||||
if (node.kind === SyntaxKind.Identifier && node.getWidth() > 0) {
|
if (node.kind === SyntaxKind.Identifier && !nodeIsMissing(node)) {
|
||||||
let symbol = typeChecker.getSymbolAtLocation(node);
|
let symbol = typeChecker.getSymbolAtLocation(node);
|
||||||
if (symbol) {
|
if (symbol) {
|
||||||
let type = classifySymbol(symbol, getMeaningFromLocation(node));
|
let type = classifySymbol(symbol, getMeaningFromLocation(node));
|
||||||
|
|
Loading…
Reference in a new issue