| 277 | function enclosure( |
| 278 | s: string, |
| 279 | i: number |
| 280 | ): [index: number, result: Expression | null] { |
| 281 | let r: Expression | null; |
| 282 | [i, r] = parenth_form(s, i); |
| 283 | // Collection displays, comprehensions, and `yield` expressions are not |
| 284 | // supported, so parentheses are the only recognized enclosure. |
| 285 | // if (r === null) [i, r] = list_display(s, i); |
| 286 | // if (r === null) [i, r] = dict_display(s, i); |
| 287 | // if (r === null) [i, r] = set_display(s, i); |
| 288 | // if (r === null) [i, r] = generator_expression(s, i); |
| 289 | // if (r === null) [i, r] = yield_atom(s, i); |
| 290 | |
| 291 | return [i, r]; |
| 292 | } |
| 293 | |
| 294 | function atom( |
| 295 | s: string, |
| 296 | start: number |