* The files whose declarations are a file's unit's own, the file first: the * unit is its own file and the include files it pulls in, so code in * `mormot.core.os.pas` sees a variable `mormot.core.os.posix.inc` declares, * and that file's code sees the unit's (see unitFilesOf).
(filePath: string, context: ResolutionContext)
| 2408 | * and that file's code sees the unit's (see unitFilesOf). |
| 2409 | */ |
| 2410 | function ownUnitFiles(filePath: string, context: ResolutionContext): string[] { |
| 2411 | const memo = memos(context).ownFiles; |
| 2412 | let own = memo.get(filePath); |
| 2413 | if (!own) { |
| 2414 | const unit = unitFilesOf(filePath, context); |
| 2415 | own = unit[0] === filePath ? unit : [filePath, ...unit.filter((f) => f !== filePath)]; |
| 2416 | memo.set(filePath, own); |
| 2417 | } |
| 2418 | return own; |
| 2419 | } |
| 2420 | |
| 2421 | /** |
| 2422 | * The files one unit is made of: its own file, then the include files it |
no test coverage detected