mirror of
https://github.com/Microsoft/vscode
synced 2024-09-19 02:26:04 +00:00
Monarch should always return non-null tokens
This commit is contained in:
parent
7efe807786
commit
74b5f506cb
|
@ -336,14 +336,14 @@ class MonarchModernTokensCollector implements IMonarchTokensCollector {
|
||||||
let bLen = b.length;
|
let bLen = b.length;
|
||||||
let cLen = (c !== null ? c.length : 0);
|
let cLen = (c !== null ? c.length : 0);
|
||||||
|
|
||||||
// Fast path
|
if (aLen === 0 && bLen === 0 && cLen === 0) {
|
||||||
if (bLen === 0) {
|
return new Uint32Array(0);
|
||||||
if (aLen === 0) {
|
}
|
||||||
return c;
|
if (aLen === 0 && bLen === 0) {
|
||||||
}
|
return c;
|
||||||
if (cLen === 0) {
|
}
|
||||||
return a;
|
if (bLen === 0 && cLen === 0) {
|
||||||
}
|
return a;
|
||||||
}
|
}
|
||||||
|
|
||||||
let result = new Uint32Array(aLen + bLen + cLen);
|
let result = new Uint32Array(aLen + bLen + cLen);
|
||||||
|
|
Loading…
Reference in a new issue