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

Method extractTagBased

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

Legacy tag-based CFML: walk ` `/` `, delegating ` ` bodies.

()

Source from the content-addressed store, hash-verified

92
93 /** Legacy tag-based CFML: walk `<cfcomponent>`/`<cffunction>`, delegating `<cfscript>` bodies. */
94 private extractTagBased(): void {
95 const parser = getParser('cfml');
96 if (!parser) {
97 this.errors.push({
98 message: 'cfml grammar not loaded',
99 severity: 'error',
100 code: 'unsupported_language',
101 });
102 return;
103 }
104
105 const tree = parser.parse(this.source);
106 if (!tree) {
107 this.errors.push({
108 message: 'Failed to parse CFML source',
109 severity: 'error',
110 code: 'parse_error',
111 });
112 return;
113 }
114
115 const fileNode = this.createFileNode();
116 this.walkProgram(tree.rootNode, fileNode.id);
117 }
118
119 /** Build the file's own `kind:'file'` node, spanning the whole source. Tag-based files need this explicitly — unlike `extractBareScript` (which delegates the whole file to `TreeSitterExtractor` and inherits its file node), `extractTagBased` walks the tree itself and has no other source of one. */
120 private createFileNode(): Node {

Callers 1

extractMethod · 0.95

Calls 3

createFileNodeMethod · 0.95
walkProgramMethod · 0.95
getParserFunction · 0.90

Tested by

no test coverage detected