277
// Check for document markers (--- / ...) at column 0
278
if (indent === 0 && this.input.length - this.pos >= 3) {
279
>
const c0 = this.input[this.pos];
yaml.ts
280
>
const c1 = this.input[this.pos + 1];
281
>
const c2 = this.input[this.pos + 2];
282
>
const c3 = this.input[this.pos + 3];
283
>
const isTerminator = c3 === undefined || c3 === ' ' || c3 === '\t' || c3 === '\n' || c3 === '\r';
284
>
if (c0 === '-' && c1 === '-' && c2 === '-' && isTerminator) {
285
this.tokens.push(makeToken(TokenType.DocumentStart, this.pos, this.pos + 3));
286
this.pos += 3;