(context: ResolutionContext)
| 195 | const luaFileBasenameIndexes = new WeakMap<ResolutionContext, Map<string, string[]>>(); |
| 196 | |
| 197 | function luaBasenameIndex(context: ResolutionContext): Map<string, string[]> { |
| 198 | let index = luaFileBasenameIndexes.get(context); |
| 199 | if (!index) { |
| 200 | index = new Map(); |
| 201 | for (const f of context.getAllFiles()) { |
| 202 | const base = f.split('/').pop() ?? ''; |
| 203 | const paths = index.get(base); |
| 204 | if (paths) paths.push(f); |
| 205 | else index.set(base, [f]); |
| 206 | } |
| 207 | luaFileBasenameIndexes.set(context, index); |
| 208 | } |
| 209 | return index; |
| 210 | } |
| 211 | |
| 212 | function resolveCobolCopybook( |
| 213 | member: string, |
no test coverage detected