314
return;
315
}
317
>
// Scan the rest of the line for tokens
318
>
this.scanLineContent();
319
>
this.scanNewline();
320
}
321
322
private scanLineContent(): void {
323
while (this.pos < this.input.length && this.peekChar() !== '\n' && this.peekChar() !== '\r') {
324
>
this.skipInlineWhitespace();
yaml.ts
325
>
if (this.pos >= this.input.length || this.peekChar() === '\n' || this.peekChar() === '\r') {
326
break;
327
}
329
>
const ch = this.peekChar();
330
>
331
>
if (ch === '#') {
332
this.scanComment();
333
break; // comment consumes rest of line
334
>
} else if (ch === '{') {
yaml.ts
335
this.flowDepth++;
336
this.tokens.push(makeToken(TokenType.FlowMapStart, this.pos, this.pos + 1));
337
this.pos++;
338
>
} else if (ch === '}' && this.flowDepth > 0) {
yaml.ts
339
this.flowDepth--;
340
this.tokens.push(makeToken(TokenType.FlowMapEnd, this.pos, this.pos + 1));
341
this.pos++;
342
>
} else if (ch === '[') {
yaml.ts
343
this.flowDepth++;
344
this.tokens.push(makeToken(TokenType.FlowSeqStart, this.pos, this.pos + 1));