import type { ParseResult } from 'kopytko-brightscript-parser'; /** * Collects the project-wide union of function names that are legitimate call * targets from outside their own file, for CLI-mode `identifier/unused-function` * (see `rules/ast/deadFunctions.ts`), populating `LintContext.calledWorkwideFuncNames`. * * Deliberately a byte-for-byte mirror of the string-pattern extraction in the VS * Code extension's `WorkspaceCallIndex._extractCalledNames` * (`src/server/utils/workspaceCallIndex.ts`) — direct calls, `observeField`/ * `observeFieldScoped`/`callFunc` string-argument dispatch, the Kopytko * `{ prop: "handlerFn" }` events-AA pattern, and XML `` * declarations. All of this is per-file syntactic extraction (pull a string out * of a known call/AA shape, union it into a flat set) — no cross-file scope * resolution is needed for it, unlike `known`-function-set building elsewhere in * this file's caller (`projectIndexer.ts`), so there was no technical reason to * leave it out; it was originally left out purely to keep the first CLI-parity * pass small. * * This is a **deliberate mirror across the package boundary**, same as the * historical `duplicateComponents.ts`/XML-parser mirrors documented in * `findings/lsp-architecture.md`: the linter package cannot depend on the * extension's `src/server/`, and the extraction logic only needs already-published * parser primitives (`walk`, `SyntaxKind`, `TokenKind`, `CallExpression`, * `AALiteral`), so duplicating it here ships without waiting on a parser publish. * If this logic is ever promoted into `kopytko-brightscript-parser` as a shared * analysis export (both consumers would use it verbatim), delete this file's * string-pattern block and import from there instead — check * `src/server/utils/workspaceCallIndex.ts`'s own copy stays in sync with this one * until then. * * `parseResultCache` is an out param: every parsed `.brs` file's `ParseResult` * is stored into it (keyed by the same normalized path used in * `fileContentsCache`) so `runLint` can reuse it for the per-file lint pass * instead of parsing the file a second time. */ export declare function collectCalledWorkwideFuncNames(fileContentsCache: Map, parseResultCache: Map): Set; //# sourceMappingURL=calledFunctionNames.d.ts.map