(tokens: readonly WordToken[])
| 96 | } |
| 97 | |
| 98 | export function joinTokens(tokens: readonly WordToken[]): string { |
| 99 | return tokens.map((t) => t.text).join(' '); |
| 100 | } |
| 101 | |
| 102 | /** Whether the bracket opened at `open` closes on the last character. */ |
| 103 | function closesAtEnd(text: string, open: number): boolean { |