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

Method extractInterfaceTag

src/extraction/cfml-extractor.ts:298–319  ·  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

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