(context: ResolutionContext)
| 295 | const luaFileBasenameIndexes = new WeakMap<ResolutionContext, Map<string, string[]>>(); |
| 296 | |
| 297 | function luaBasenameIndex(context: ResolutionContext): Map<string, string[]> { |
| 298 | let index = luaFileBasenameIndexes.get(context); |
| 299 | if (!index) { |
| 300 | index = new Map(); |
| 301 | for (const f of context.getAllFiles()) { |
| 302 | const base = f.split('/').pop() ?? ''; |
| 303 | const paths = index.get(base); |
| 304 | if (paths) paths.push(f); |
| 305 | else index.set(base, [f]); |
| 306 | } |
| 307 | luaFileBasenameIndexes.set(context, index); |
| 308 | } |
| 309 | return index; |
| 310 | } |
| 311 | |
| 312 | function resolveCobolCopybook( |
| 313 | member: string, |
no test coverage detected