/** * Language Configuration Registry * * Centralized configuration for all supported languages. * To add a new language, simply add an entry here - no code changes needed. */ /** * Embedded language configuration */ export interface EmbeddedLanguageConfig { /** AST node type that contains embedded code */ readonly nodeType: string; /** Attribute name containing the language (e.g., 'lang' for ```python) */ readonly langAttr?: string; /** Default language if not specified */ readonly defaultLanguage?: string; /** Whether to recursively parse the embedded content */ readonly recursive?: boolean; } /** * Language configuration */ export interface LanguageConfig { /** NPM package name for the Synth parser */ readonly parser: string; /** File extensions (including dot) */ readonly extensions: readonly string[]; /** AST node types that represent semantic boundaries */ readonly boundaries: readonly string[]; /** AST node types that represent context (imports, types) */ readonly contextTypes?: readonly string[]; /** Embedded language configurations */ readonly embedded?: readonly EmbeddedLanguageConfig[]; /** Parser options to pass to Synth */ readonly parserOptions?: Record; } /** * Language Registry * * Maps language identifiers to their configurations. * Language identifiers should be lowercase. */ export declare const LANGUAGE_REGISTRY: Record; /** * Extension to language mapping (built from registry) */ export declare const EXTENSION_TO_LANGUAGE: Record; /** * Get language config by language name */ export declare function getLanguageConfig(language: string): LanguageConfig | undefined; /** * Get language config by file extension */ export declare function getLanguageConfigByExtension(extension: string): LanguageConfig | undefined; /** * Get language name from file path */ export declare function getLanguageFromPath(filePath: string): string | undefined; /** * Check if a language is supported */ export declare function isLanguageSupported(language: string): boolean; /** * Get all supported languages */ export declare function getSupportedLanguages(): string[]; /** * Get all supported extensions */ export declare function getSupportedExtensions(): string[]; //# sourceMappingURL=language-config.d.ts.map