The routine a reference comes from, or null when it comes from a file or anything else.
(id: string, context: ResolutionContext)
| 939 | |
| 940 | /** The routine a reference comes from, or null when it comes from a file or anything else. */ |
| 941 | function routineNode(id: string, context: ResolutionContext): Node | null { |
| 942 | const memo = memos(context).routineNodes; |
| 943 | if (memo.has(id)) return memo.get(id)!; |
| 944 | const node = context.getNodeById?.(id) ?? null; |
| 945 | const routine = node && isRoutine(node) ? node : null; |
| 946 | memo.set(id, routine); |
| 947 | return routine; |
| 948 | } |
| 949 | |
| 950 | /** |
| 951 | * A bare Pascal call (`Inner(1)`) to a routine nested where the call is (see |
no test coverage detected