8000 do not try to classify missing nodes · rvdn/TypeScript@8e2b204 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8e2b204

Browse files
committed
do not try to classify missing nodes
1 parent 644ea82 commit 8e2b204

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/services/services.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6300,6 +6300,10 @@ namespace ts {
63006300
}
63016301

63026302
function classifyToken(token: Node): void {
6303+
if (nodeIsMissing(token)) {
6304+
return;
6305+
}
6306+
63036307
let tokenStart = classifyLeadingTriviaAndGetTokenStart(token);
63046308

63056309
let tokenWidth = token.end - tokenStart;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/// <reference path='fourslash.ts'/>
2+
3+
////class A {
4+
//// a:
5+
////}
6+
////c =
7+
8+
let c = classification
9+
verify.syntacticClassificationsAre(
10+
c.keyword("class"), c.className("A"), c.punctuation("{"),
11+
c.text("a"), c.punctuation(":"),
12+
c.punctuation("}"),
13+
c.text("c"), c.operator("=")
14+
);

0 commit comments

Comments
 (0)
0