Skip to content

feat: add ReScript language support#49

Open
mschreib28 wants to merge 9 commits into
mainfrom
upstream/feat/rescript-support
Open

feat: add ReScript language support#49
mschreib28 wants to merge 9 commits into
mainfrom
upstream/feat/rescript-support

Conversation

@mschreib28
Copy link
Copy Markdown
Owner

Add ReScript (https://rescript-lang.org/) as a supported language with tree-sitter parsing for .res and .resi files.\r\n\r\nThe tree-sitter-rescript.wasm grammar (908KB) was built from https://github.com/rescript-lang/tree-sitter-rescript via Docker + emscripten. AST node mappings cover let_declaration, module_declaration, type_declaration, call_expression, pipe_expression, open_statement, and include_statement.\r\n\r\nFix symbol disambiguation in MCP tools: add file parameter to codegraph_node, codegraph_callers, codegraph_callees, and codegraph_impact so that ambiguous symbol names can be resolved by file path. When file is provided but no match is found, return an error instead of silently falling back to a different symbol.


Copied from colbymchenry/codegraph#58

malo and others added 9 commits March 12, 2026 20:30
Add ReScript (https://rescript-lang.org/) as a supported language with
tree-sitter parsing for .res and .resi files.

The tree-sitter-rescript.wasm grammar (908KB) was built from
https://github.com/rescript-lang/tree-sitter-rescript via Docker +
emscripten. AST node mappings cover let_declaration, module_declaration,
type_declaration, call_expression, pipe_expression, open_statement, and
include_statement.

Fix symbol disambiguation in MCP tools: add file parameter to codegraph_node,
codegraph_callers, codegraph_callees, and codegraph_impact so that ambiguous
symbol names can be resolved by file path. When file is provided but no match
is found, return an error instead of silently falling back to a different symbol.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…E.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Resolves merge conflicts with upstream's refactored extraction architecture:
- Language extraction split into per-file modules in src/extraction/languages/
- ReScript extractor moved to src/extraction/languages/rescript.ts using
  the visitNode hook with ExtractorContext API
- MCP tools updated to use upstream's findAllSymbols approach (file param
  for disambiguation superseded by aggregation across all matching symbols)
- CLAUDE.md and README.md updated with both Svelte and ReScript

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The file parameter was added to codegraph_callers, codegraph_callees,
codegraph_impact, and codegraph_node schemas but the handlers never used
it. Conflict resolution replaced the implementation with upstream's
findAllSymbols aggregation approach. Remove the dead schema entries to
keep the diff purely ReScript-related.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…oading

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…architecture

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants