654
return tokens;
655
}
657
>
// Check if the first token starts with whitespace
658
>
const firstTokenEndIndex = firstToken.endIndex;
659
>
let firstNonWhitespaceIndex = 0;
660
>
for (let i = 0; i < firstTokenEndIndex; i++) {
661
>
const charCode = lineContent.charCodeAt(i);
662
>
if (charCode !== CharCode.Space && charCode !== CharCode.Tab) {
663
>
firstNonWhitespaceIndex = i;
664
>
break;
665
>
}
666
>
}
667
>
668
>
if (firstNonWhitespaceIndex === 0) {
669
>
// No leading whitespace
670
>
return tokens;
671
>
}
672
673
// Split the first token into leading whitespace and the rest