1414
}
1415
}
1417
>
const contentToken = this.peekPastIndent();
1418
>
if (contentToken.type !== TokenType.Dash) { break; }
1419
>
1420
>
// Skip indent
1421
>
if (this.currentToken().type === TokenType.Indent) {
1422
this.advance();
1423
}
1425
>
// Consume the dash
1426
>
const dashToken = this.advance();
1427
>
1428
>
// Parse the item value
1429
>
const itemValue = this.parseSequenceItemValue(baseIndent, dashToken);
1430
>
items.push(itemValue);
1431
>
endOffset = itemValue.endOffset;
1432
>
}
1433
>
1434
>
return { type: 'sequence', items, style: 'block', startOffset, endOffset };
1435
>
}
1436
1437
private parseSequenceItemValue(baseIndent: number, dashToken: Token): YamlNode {
1438
>
const next = this.currentToken();
yaml.ts
1439
>
1440
>
// Skip comment after dash
1441
>
if (next.type === TokenType.Comment) {
1442
this.advance();
1443
}
1445
>
// Flow collections on same line
1446
>
if (next.type === TokenType.FlowMapStart) { return this.parseFlowMap(); }
1447
>
if (next.type === TokenType.FlowSeqStart) { return this.parseFlowSeq(); }
1448
1449
// Nested sequence on same line (e.g., '- - value')