MCPcopy Create free account
hub / github.com/CodeGraphContext/CodeGraphContext / getLanguageQueryKey

Function getLanguageQueryKey

website/src/lib/parser.worker.ts:491–511  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

489
490// Map file extension → query key
491function getLanguageQueryKey(path: string): string | null {
492 const ext = path.match(/\.([a-zA-Z0-9]+)$/)?.[1]?.toLowerCase();
493 switch (ext) {
494 case 'py': return 'python';
495 case 'js': case 'jsx': return 'javascript';
496 case 'ts': case 'tsx': return 'typescript';
497 case 'java': return 'java';
498 case 'c': case 'h': return 'c';
499 case 'cpp': case 'hpp': case 'cc': return 'cpp';
500 case 'go': return 'go';
501 case 'rs': return 'rust';
502 case 'rb': return 'ruby';
503 case 'php': return 'php';
504 case 'kt': case 'kts': return 'kotlin';
505 case 'dart': return 'dart';
506 case 'cs': return 'csharp';
507 case 'swift': return 'swift';
508 case 'pl': case 'pm': return 'perl';
509 default: return null;
510 }
511}
512
513// Label a definition node type as Class / Function / Interface / etc.
514function getNodeDisplayLabel(nodeType: string): string {

Callers 1

processNextBatchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected