(input: string)
| 568 | * ``` |
| 569 | */ |
| 570 | export function parseList(input: string): List { |
| 571 | const state: ParserState = { input, pos: 0 }; |
| 572 | skipSP(state); |
| 573 | const list = parseListInternal(state); |
| 574 | skipSP(state); |
| 575 | if (!isEof(state)) { |
| 576 | throw new SyntaxError( |
| 577 | `Invalid structured field: unexpected character at position ${state.pos}`, |
| 578 | ); |
| 579 | } |
| 580 | return list; |
| 581 | } |
| 582 | |
| 583 | function parseListInternal(state: ParserState): List { |
| 584 | const members: List = []; |
no test coverage detected