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

Method extractInterfaceTag

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

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