* 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)
| 212 | * free — and cannot drift, because there is only one list. |
| 213 | */ |
| 214 | function 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 |