MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / createFileNode

Method createFileNode

src/extraction/dfm-extractor.ts:56–76  ·  view source on GitHub ↗

Create a file node for the DFM form file

()

Source from the content-addressed store, hash-verified

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 {

Callers 1

extractMethod · 0.95

Calls 1

generateNodeIdFunction · 0.90

Tested by

no test coverage detected