MCPcopy Index your code
hub / github.com/CodeGraphContext/CodeGraphContext / getLanguageQueryKey

Function getLanguageQueryKey

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

Source from the content-addressed store, hash-verified

406
407// Map file extension → query key
408function getLanguageQueryKey(path: string): string | null {
409 const ext = path.match(/\.([a-zA-Z0-9]+)$/)?.[1]?.toLowerCase();
410 switch (ext) {
411 case 'py': return 'python';
412 case 'js': case 'jsx': return 'javascript';
413 case 'ts': case 'tsx': return 'typescript';
414 case 'java': return 'java';
415 case 'c': case 'h': return 'c';
416 case 'cpp': case 'hpp': case 'cc': return 'cpp';
417 case 'go': return 'go';
418 case 'rs': return 'rust';
419 case 'rb': return 'ruby';
420 case 'php': return 'php';
421 case 'kt': case 'kts': return 'kotlin';
422 case 'dart': return 'dart';
423 case 'cs': return 'csharp';
424 case 'swift': return 'swift';
425 case 'pl': case 'pm': return 'perl';
426 default: return null;
427 }
428}
429
430// Label a definition node type as Class / Function / Interface / etc.
431function getNodeDisplayLabel(nodeType: string): string {

Callers 1

processNextBatchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected