(scopes: RustScopes, offset: number)
| 708 | |
| 709 | /** The innermost `impl` or `trait` body around `offset`, if any. */ |
| 710 | export function rustImplAt(scopes: RustScopes, offset: number): RustImplBlock | undefined { |
| 711 | let best: RustImplBlock | undefined; |
| 712 | for (const b of scopes.impls) { |
| 713 | if (offset > b.from && offset < b.to && (!best || b.from > best.from)) best = b; |
| 714 | } |
| 715 | return best; |
| 716 | } |
| 717 | |
| 718 | /** `text` parted at its top-level `sep`s, outside `()`, `[]`, `{}` and `<>` (`->` closes nothing). */ |
| 719 | export function splitRustTopLevel(text: string, sep: string): string[] { |
nothing calls this directly
no outgoing calls
no test coverage detected