Skip to content

feat: add Solidity language support#299

Open
guiltylotus wants to merge 1 commit into
colbymchenry:mainfrom
guiltylotus:feat/solidity-support
Open

feat: add Solidity language support#299
guiltylotus wants to merge 1 commit into
colbymchenry:mainfrom
guiltylotus:feat/solidity-support

Conversation

@guiltylotus
Copy link
Copy Markdown

@guiltylotus guiltylotus commented May 22, 2026

Summary

  • Adds .sol file indexing via a vendored tree-sitter-solidity WASM (v1.2.13)
  • Extracts contracts and libraries as class, interfaces as interface, structs, enums, functions, modifiers, events, constructors, fallback/receive, state variables, constants, and imports — all with full signature capture
  • Registers solidity in LANGUAGES, EXTENSION_MAP, WASM_GRAMMAR_FILES, the vendored WASM path check, and the display name map

What gets indexed

Solidity construct Graph kind
contract_declaration, library_declaration class
interface_declaration interface
struct_declaration struct
enum_declaration / enum_value enum / enum_member
function_definition, modifier_definition, event_definition method / function
constructor_definition, fallback_receive_definition function (via visitNode)
state_variable_declaration variable with type signature
constant_variable_declaration constant
import_directive import

Benchmark

Language Cost Tokens Time Tool calls
Solidity · ~343 files 8% cheaper 25% fewer 10% faster 29% fewer

Notes

  • WASM vendored from tree-sitter-solidity@1.2.13 (same vendoring pattern as Lua, Luau, Pascal, Scala)
  • constructor_definition and fallback_receive_definition have no name field in the AST — handled via the visitNode hook, naming them "constructor", "fallback", or "receive" respectively
  • Solidity external visibility is mapped to public in the graph (it means callable from outside the contract)

🤖 Generated with Claude Code

Adds .sol indexing via tree-sitter-solidity (vendored WASM). Extracts
contracts and libraries as classes, interfaces as interfaces, structs,
enums, functions, modifiers, events, constructors, fallback/receive,
state variables, constants, and imports with full signature capture.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@guiltylotus guiltylotus reopened this May 22, 2026
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.

1 participant