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

Function programName

src/extraction/languages/cobol.ts:425–432  ·  view source on GitHub ↗

Program name from identification_division > program_name.

(programNode: SyntaxNode, source: string)

Source from the content-addressed store, hash-verified

423
424/** Program name from identification_division > program_name. */
425function programName(programNode: SyntaxNode, source: string): string | null {
426 const idDiv = programNode.namedChildren.find(
427 (c: SyntaxNode) => c?.type === 'identification_division'
428 );
429 const nameNode = idDiv?.namedChildren.find((c: SyntaxNode) => c?.type === 'program_name');
430 if (!nameNode) return null;
431 return getNodeText(nameNode, source).trim().replace(/^['"]|['"]$/g, '').replace(/\.$/, '');
432}
433
434export const cobolExtractor: LanguageExtractor = {
435 // All extraction flows through the visitNode hook — COBOL's flat,

Callers 1

cobol.tsFile · 0.85

Calls 1

getNodeTextFunction · 0.90

Tested by

no test coverage detected