(tokens: ReadonlyArray<Token>)
| 213 | } |
| 214 | |
| 215 | const makeCursor = (tokens: ReadonlyArray<Token>): TokenCursor => { |
| 216 | let i = 0 |
| 217 | return { |
| 218 | peek: () => tokens[i], |
| 219 | take: () => tokens[i++], |
| 220 | rest: () => tokens.slice(i) |
| 221 | } |
| 222 | } |
| 223 | |
| 224 | /* ========================================================================== */ |
| 225 | /* Flag Registry */ |
no outgoing calls
no test coverage detected