You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(resolver): extract generator functions as definitions (JS/TS) (#1333)
* feat(resolver): extract generator functions as definitions (JS/TS)
Register function* declarations and const gen = function*() {} as
first-class function definitions in both the WASM and native engines.
Before this change, generator_function_declaration nodes were absent
from the definition registry, so:
- Calls inside generator bodies were attributed to the file level
- yield* gen8() and other inter-generator calls produced no edges
- The generators jelly-micro fixture scored 0% recall (0/9 named edges)
Changes:
- parser.ts + wasm-worker-entry.ts: add generator_function_declaration
and generator_function (var-declared) to COMMON_QUERY_PATTERNS
- extractors/javascript.ts: walk-path case, handleVariableDecl,
extractConstDeclarators skip guard, export kindMaps, return type map
- extractors/javascript.rs: equivalent changes for native engine parity
- Add generators jelly-micro fixture (9 named edges, 100% recall)
- Add 4 unit tests for generator extraction and yield* call capture
Closes#1319
docs check acknowledged
* test(parsers): strengthen generator call attribution assertion with line-range check
0 commit comments