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

Function definitionTypesFor

src/extraction/syntax-tokens.ts:214–226  ·  view source on GitHub ↗

* Every node type that declares something, per language, from the extractors. * * This is the single piece of per-language knowledge the classifier uses, and * it is borrowed rather than restated: the same lists drive extraction, so a * language that learns a new declaration form gets its name b

(extractor: LanguageExtractor)

Source from the content-addressed store, hash-verified

212 * free — and cannot drift, because there is only one list.
213 */
214function definitionTypesFor(extractor: LanguageExtractor): ReadonlySet<string> {
215 return new Set([
216 ...extractor.functionTypes,
217 ...extractor.classTypes,
218 ...extractor.methodTypes,
219 ...extractor.interfaceTypes,
220 ...extractor.structTypes,
221 ...extractor.enumTypes,
222 ...extractor.typeAliasTypes,
223 ...(extractor.unionTypes ?? []),
224 ...(extractor.extraClassNodeTypes ?? []),
225 ]);
226}
227
228/* ------------------------------------------------------------- the walker -- */
229

Callers 1

classifyTreeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected