(position: number, span: AbsoluteSourceSpan | ParseSourceSpan)
| 413 | } |
| 414 | |
| 415 | export function isWithin(position: number, span: AbsoluteSourceSpan | ParseSourceSpan): boolean { |
| 416 | let start: number, end: number; |
| 417 | if (span instanceof ParseSourceSpan) { |
| 418 | start = span.start.offset; |
| 419 | end = span.end.offset; |
| 420 | } else { |
| 421 | start = span.start; |
| 422 | end = span.end; |
| 423 | } |
| 424 | // Note both start and end are inclusive because we want to match conditions |
| 425 | // like ¦start and end¦ where ¦ is the cursor. |
| 426 | return start <= position && position <= end; |
| 427 | } |
| 428 | |
| 429 | /** |
| 430 | * For a given location in a shim file, retrieves the corresponding file url for the template and |
no outgoing calls
no test coverage detected
searching dependent graphs…