(context: ResolutionContext)
| 505 | const luaFileBasenameIndexes = new WeakMap<ResolutionContext, Map<string, string[]>>(); |
| 506 | |
| 507 | function luaBasenameIndex(context: ResolutionContext): Map<string, string[]> { |
| 508 | let index = luaFileBasenameIndexes.get(context); |
| 509 | if (!index) { |
| 510 | index = new Map(); |
| 511 | for (const f of context.getAllFiles()) { |
| 512 | const base = f.split('/').pop() ?? ''; |
| 513 | const paths = index.get(base); |
| 514 | if (paths) paths.push(f); |
| 515 | else index.set(base, [f]); |
| 516 | } |
| 517 | luaFileBasenameIndexes.set(context, index); |
| 518 | } |
| 519 | return index; |
| 520 | } |
| 521 | |
| 522 | function resolveCobolCopybook( |
| 523 | member: string, |
no test coverage detected