mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 11:54:44 -06:00
Add assertion when classification has unexpected length
This commit is contained in:
parent
35a6426a79
commit
fcdd5bd782
@ -499,8 +499,10 @@ namespace ts {
|
||||
return { spans, endOfLineState: EndOfLineState.None };
|
||||
|
||||
function pushClassification(start: number, end: number, type: ClassificationType): void {
|
||||
const length = end - start;
|
||||
Debug.assert(length >= 0, `Classification had non-positive length of ${length}`);
|
||||
spans.push(start);
|
||||
spans.push(end - start);
|
||||
spans.push(length);
|
||||
spans.push(type);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user