The class or record name a declared type (`type`/`typeref`) stands for: `TFoo`, `Sys.TFoo` → `TFoo`, `TList ` → `TList`.
(type: SyntaxNode | null | undefined)
| 9250 | |
| 9251 | /** The class or record name a declared type (`type`/`typeref`) stands for: `TFoo`, `Sys.TFoo` → `TFoo`, `TList<T>` → `TList`. */ |
| 9252 | private pascalTypeName(type: SyntaxNode | null | undefined): string | null { |
| 9253 | let ref = type?.type === 'type' ? type.namedChild(0) : type; |
| 9254 | if (ref?.type !== 'typeref') return null; |
| 9255 | ref = ref.namedChild(0); |
| 9256 | if (ref?.type === 'typerefDot') ref = ref.namedChild(ref.namedChildCount - 1); |
| 9257 | else if (ref?.type === 'typerefTpl') ref = ref.namedChild(0); |
| 9258 | return ref?.type === 'identifier' ? getNodeText(ref, this.source) : null; |
| 9259 | } |
| 9260 | |
| 9261 | /** |
| 9262 | * Extract function calls from a Pascal expression. A `receiverLink` call is |
no test coverage detected