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

Function handleTypeAlias

src/extraction/languages/erlang.ts:164–173  ·  view source on GitHub ↗
(node: SyntaxNode, ctx: ExtractorContext)

Source from the content-addressed store, hash-verified

162}
163
164function handleTypeAlias(node: SyntaxNode, ctx: ExtractorContext): boolean {
165 const typeName = getChildByField(node, 'name'); // type_name wrapper
166 const nameNode = typeName ? getChildByField(typeName, 'name') : null;
167 if (nameNode) {
168 ctx.createNode('type_alias', atomText(nameNode, ctx.source), node, {
169 signature: collapseWs(getNodeText(node, ctx.source)).slice(0, 200),
170 });
171 }
172 return true;
173}
174
175function handlePpDefine(node: SyntaxNode, ctx: ExtractorContext): boolean {
176 const lhs = getChildByField(node, 'lhs');

Callers 1

erlang.tsFile · 0.85

Calls 5

getChildByFieldFunction · 0.90
getNodeTextFunction · 0.90
atomTextFunction · 0.85
collapseWsFunction · 0.85
createNodeMethod · 0.65

Tested by

no test coverage detected