Create a file node for the DFM form file
()
| 54 | |
| 55 | /** Create a file node for the DFM form file */ |
| 56 | private createFileNode(): Node { |
| 57 | const lines = this.source.split('\n'); |
| 58 | const id = generateNodeId(this.filePath, 'file', this.filePath, 1); |
| 59 | |
| 60 | const fileNode: Node = { |
| 61 | id, |
| 62 | kind: 'file', |
| 63 | name: this.filePath.split('/').pop() || this.filePath, |
| 64 | qualifiedName: this.filePath, |
| 65 | filePath: this.filePath, |
| 66 | language: 'pascal', |
| 67 | startLine: 1, |
| 68 | endLine: lines.length, |
| 69 | startColumn: 0, |
| 70 | endColumn: lines[lines.length - 1]?.length || 0, |
| 71 | updatedAt: Date.now(), |
| 72 | }; |
| 73 | |
| 74 | this.nodes.push(fileNode); |
| 75 | return fileNode; |
| 76 | } |
| 77 | |
| 78 | /** Parse object/end blocks and extract components + event handlers */ |
| 79 | private parseComponents(fileNodeId: string): void { |
no test coverage detected