/** * Language-aware normalization router. * * Detects the source language from a file extension and dispatches to the * appropriate tree-sitter normalizer. All normalizers share the same Sigma * IR alphabet so the resulting PDG is directly comparable regardless of the * source language. * * Supported extensions: * .go → normalizeGo (tree-sitter-go) * .rs → normalizeRust (tree-sitter-rust) * .ts .tsx .js → normalizeTypescript (tree-sitter-typescript) * .jsx (default)→ normalizeTypescript */ import { PDG } from './pdg.js'; import { Sigma } from './sigma.js'; export type SupportedLanguage = 'typescript' | 'go' | 'rust'; /** * Resolve a SupportedLanguage from a file path or bare extension string. * Returns `'typescript'` as the safe default for unknown extensions. */ export declare function languageFromExtension(filePathOrExt: string): SupportedLanguage; /** * Normalize `source` code to a PDG using the normalizer that corresponds to * the given file extension. * * @param source - Raw source code string. * @param filePathOrExt - File path (e.g. `"cmd/main.go"`) or bare extension * (e.g. `".go"`). Used only for language detection. * @param sigma - Optional pre-loaded Sigma alphabet. If omitted, the * default sigma.json is loaded automatically. */ export declare function normalizeByExtension(source: string, filePathOrExt: string, sigma?: Sigma): PDG; //# sourceMappingURL=normalize.d.ts.map