Merge pull request #3608 from Microsoft/dontClassifyMissingNodes

do not try to classify missing nodes
This commit is contained in:
Vladimir Matveev 2015-06-23 11:39:09 -07:00
commit 5b3eba13a2
2 changed files with 18 additions and 0 deletions

View File

@ -6300,6 +6300,10 @@ namespace ts {
}
function classifyToken(token: Node): void {
if (nodeIsMissing(token)) {
return;
}
let tokenStart = classifyLeadingTriviaAndGetTokenStart(token);
let tokenWidth = token.end - tokenStart;

View File

@ -0,0 +1,14 @@
/// <reference path='fourslash.ts'/>
////class A {
//// a:
////}
////c =
let c = classification
verify.syntacticClassificationsAre(
c.keyword("class"), c.className("A"), c.punctuation("{"),
c.text("a"), c.punctuation(":"),
c.punctuation("}"),
c.text("c"), c.operator("=")
);