the element that checks `data[index]`
(data: array, index: number)
| 342 | |
| 343 | /** the element that checks `data[index]` */ |
| 344 | protected atIndex(data: array, index: number): SequenceElement { |
| 345 | if (index < this.leading.length) return this.tuple[index] |
| 346 | const firstPostfixIndex = data.length - this.postLen |
| 347 | if (index >= firstPostfixIndex) |
| 348 | return { kind: "postfix", node: this.postfix![index - firstPostfixIndex] } |
| 349 | return { |
| 350 | kind: "variadic", |
| 351 | node: |
| 352 | this.variadic ?? |
| 353 | throwInternalError( |
| 354 | `Unexpected attempt to access index ${index} on ${this}` |
| 355 | ) |
| 356 | } |
| 357 | } |
| 358 | |
| 359 | // minLength/maxLength should be checked by Intersection before either traversal |
| 360 | tAllows(data: array, ctx: InternalTraversal | AliasDepth): boolean { |
no test coverage detected