173
174
public createCharSequence(shouldIgnoreTrimWhitespace: boolean, startIndex: number, endIndex: number): CharSequence {
176
>
const lineNumbers: number[] = [];
177
>
const columns: number[] = [];
178
>
let len = 0;
179
>
for (let index = startIndex; index <= endIndex; index++) {
180
>
const lineContent = this.lines[index];
181
>
const startColumn = (shouldIgnoreTrimWhitespace ? this._startColumns[index] : 1);
182
>
const endColumn = (shouldIgnoreTrimWhitespace ? this._endColumns[index] : lineContent.length + 1);
183
>
for (let col = startColumn; col < endColumn; col++) {
184
>
charCodes[len] = lineContent.charCodeAt(col - 1);
185
>
lineNumbers[len] = index + 1;
186
>
columns[len] = col;
187
>
len++;
188
>
}
189
>
if (!shouldIgnoreTrimWhitespace && index < endIndex) {
190
// Add \n if trim whitespace is not ignored
191
charCodes[len] = CharCode.LineFeed;