/** * CFG (Control Flow Graph) builder */ import type { Tree } from 'web-tree-sitter'; import type { CFG, SupportedLanguage } from '../../types/index.js'; import { type NodeCache } from '../parser.js'; /** * Build CFG for all methods in the tree. * * `cache` (added in 3.172.0, cognium-dev#254 T2-A): when provided, top-level * `findNodes` walks for function/method containers are replaced with O(1) * cache lookups populated by `collectAllNodes` at analyzer entry. Java's * `method_declaration`/`import_declaration` and JS's `function_declaration`/ * `arrow_function`/`method_definition` are already in the language-cache set; * `constructor_declaration`, `function`, `function_expression` are added by * this ship. Falls back to `findNodes` when cache is absent (test / library * callers that build a Tree directly). */ export declare function buildCFG(tree: Tree, language?: SupportedLanguage, cache?: NodeCache): CFG; //# sourceMappingURL=cfg.d.ts.map