Home

giogio / openez-graph

public
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

fix(oxc-parser): index variable-bound arrow/function expressions

3 months ago

929eeab
Authored
asta-nguyen8/8/2026, 6:04:15 AM
VariableDeclaration nodes have .declarations[], not .id, so
getNodeId() returns null and the if (!name) continue guard skipped
them before reaching the case VariableDeclaration handler. This made
the handler dead code — arrow functions and function expressions
assigned to variables were never indexed.

Fix: move the VariableDeclaration handler before the getNodeId guard,
since it extracts names from .declarations[].id directly.

Verified: export const helper = () => {} and const fn = function() {}
are now indexed as function symbols. FunctionDeclaration and
ClassDeclaration still work via the getNodeId path.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>

Parent94b0a36

1 file changed
  • packages/indexer/src/parsers/oxc-parser.ts+33−28