(context: ResolutionContext)
| 521 | const luaFileBasenameIndexes = new WeakMap<ResolutionContext, Map<string, string[]>>(); |
| 522 | |
| 523 | function luaBasenameIndex(context: ResolutionContext): Map<string, string[]> { |
| 524 | let index = luaFileBasenameIndexes.get(context); |
| 525 | if (!index) { |
| 526 | index = new Map(); |
| 527 | for (const f of context.getAllFiles()) { |
| 528 | const base = f.split('/').pop() ?? ''; |
| 529 | const paths = index.get(base); |
| 530 | if (paths) paths.push(f); |
| 531 | else index.set(base, [f]); |
| 532 | } |
| 533 | luaFileBasenameIndexes.set(context, index); |
| 534 | } |
| 535 | return index; |
| 536 | } |
| 537 | |
| 538 | function resolveCobolCopybook( |
| 539 | member: string, |
no test coverage detected