The recorded expression containing a synthesized-source position: the last one starting at or before it.
(row: number, column: number)
| 537 | |
| 538 | /** The recorded expression containing a synthesized-source position: the last one starting at or before it. */ |
| 539 | private tagExpressionAt(row: number, column: number): TagExpression { |
| 540 | const exprs = this.tagExpressions; |
| 541 | let lo = 0; |
| 542 | let hi = exprs.length - 1; |
| 543 | let found = 0; |
| 544 | while (lo <= hi) { |
| 545 | const mid = (lo + hi) >> 1; |
| 546 | const e = exprs[mid]!; |
| 547 | if (e.row < row || (e.row === row && e.textColumn <= column)) { |
| 548 | found = mid; |
| 549 | lo = mid + 1; |
| 550 | } else { |
| 551 | hi = mid - 1; |
| 552 | } |
| 553 | } |
| 554 | return exprs[found]!; |
| 555 | } |
| 556 | |
| 557 | /** A generic `cf_tag`'s start tag — where its name and attributes live. */ |
| 558 | private cfStartTag(tag: SyntaxNode): SyntaxNode | undefined { |
no outgoing calls
no test coverage detected