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

Method extractInterfaceTag

src/extraction/cfml-extractor.ts:297–318  ·  view source on GitHub ↗

* ` ... ` (#2091). Unlike * ` ` (see the implicit-end-tag note on `extractComponent`) the * grammar has no dedicated rule for it: it is a generic `cf_tag` whose body * — the ` ` signatures — is ordinary nested children.

(tag: SyntaxNode, containerId: string)

Source from the content-addressed store, hash-verified

295 * extend several interfaces, comma-separated.
296 */
297 private extractInterfaceTag(tag: SyntaxNode, containerId: string): void {
298 const startTag = this.cfStartTag(tag) ?? tag;
299 const name = this.tagAttr(startTag, 'name') ?? this.componentNameFromPath();
300 const id = this.nodeIds.generate(this.filePath, 'interface', name, tag.startPosition.row + 1, tag.startPosition.column);
301 this.nodes.push({
302 id,
303 kind: 'interface',
304 name,
305 qualifiedName: `${this.filePath}::${name}`,
306 filePath: this.filePath,
307 language: this.language,
308 startLine: tag.startPosition.row + 1,
309 endLine: tag.endPosition.row + 1,
310 startColumn: tag.startPosition.column,
311 endColumn: tag.endPosition.column,
312 isExported: true,
313 updatedAt: Date.now(),
314 });
315 this.edges.push({ source: containerId, target: id, kind: 'contains' });
316 this.pushInheritanceRefs(id, this.tagAttr(startTag, 'extends'), 'extends', startTag);
317 this.delegateNestedTags(tag, id, name, true);
318 }
319
320 /** One unresolved `extends`/`implements` ref per name in a comma-separated tag attribute. */
321 private pushInheritanceRefs(fromNodeId: string, list: string | undefined, kind: 'extends' | 'implements', tag: SyntaxNode): void {

Callers 1

visitTagMethod · 0.95

Calls 7

cfStartTagMethod · 0.95
tagAttrMethod · 0.95
componentNameFromPathMethod · 0.95
pushInheritanceRefsMethod · 0.95
delegateNestedTagsMethod · 0.95
pushMethod · 0.80
generateMethod · 0.45

Tested by

no test coverage detected