* Parses a group, essentially returning the string formed by the * brace-enclosed tokens plus some position information.
(
optional: boolean,
)
| 628 | * brace-enclosed tokens plus some position information. |
| 629 | */ |
| 630 | parseStringGroup( |
| 631 | optional: boolean, |
| 632 | ): Token | null { |
| 633 | const argToken = this.gullet.scanArgument(optional); |
| 634 | if (argToken == null) { |
| 635 | return null; |
| 636 | } |
| 637 | let str = ""; |
| 638 | let nextToken: Token; |
| 639 | while ((nextToken = this.fetch()).text !== "EOF") { |
| 640 | str += nextToken.text; |
| 641 | this.consume(); |
| 642 | } |
| 643 | this.consume(); // consume the end of the argument |
| 644 | argToken.text = str; |
| 645 | return argToken; |
| 646 | } |
| 647 | |
| 648 | /** |
| 649 | * Parses a regex-delimited group: the largest sequence of tokens |
no test coverage detected