import type { Symbols } from '../core/types.js'; export interface SymbolMap { /** All raw symbols from the .noi file (with leading underscore) */ raw: Map; /** Clean symbols (leading underscore stripped) for convenient access */ clean: Map; } /** * Parse SDCC .noi content into symbol maps. * Format: `DEF _symbolName 0xABCD` (one per line) */ export declare function parseNoi(content: string): SymbolMap; /** * Parse SDCC .lst file contents to resolve static (non-exported) function addresses. * * Strategy: * 1. For each .lst content, collect all labels grouped by their .area section. * 2. For each area, find an exported label that exists in the .noi symbols. * 3. Compute area base = noi_absolute_addr - lst_local_offset. * 4. For areas with no exported anchor, fall back to the segment base * from the .noi file (e.g. s__DATA for .area _DATA). * 5. Resolve static labels in the same area using that base. */ export declare function parseStaticSymbols(lstContents: string[], noiSymbols: SymbolMap): Map; /** Array of .lst file contents in link order. Use SdccSymbolProvider.parseLk() to create. */ export type OrderedLstContents = string[] & { readonly __brand: 'OrderedLstContents'; }; /** * Symbols implementation for SDCC-compiled programs. * Resolves both exported (.noi) and static (.lst) symbols. */ export declare class SdccSymbols implements Symbols { private noiSymbols; private staticSymbols; constructor(noiContent: string, lstContents?: OrderedLstContents); /** * Parse .lk content and return .lst contents in link order. * Keys in lstContents are basenames (without extension) matching the .rel entries in the .lk file. */ static parseLk(lkContent: string, lstContents: Record): OrderedLstContents; /** Create from file paths (convenience for loading from disk) */ static fromFiles(noiPath: string, lstDir?: string): SdccSymbols; query(name: string): number | undefined; get(name: string): number; has(name: string): boolean; } //# sourceMappingURL=sdcc.d.ts.map