feat: add Solidity language support#299
Open
guiltylotus wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.solfile indexing via a vendoredtree-sitter-solidityWASM (v1.2.13)class, interfaces asinterface, structs, enums, functions, modifiers, events, constructors, fallback/receive, state variables, constants, and imports — all with full signature capturesolidityinLANGUAGES,EXTENSION_MAP,WASM_GRAMMAR_FILES, the vendored WASM path check, and the display name mapWhat gets indexed
contract_declaration,library_declarationclassinterface_declarationinterfacestruct_declarationstructenum_declaration/enum_valueenum/enum_memberfunction_definition,modifier_definition,event_definitionmethod/functionconstructor_definition,fallback_receive_definitionfunction(viavisitNode)state_variable_declarationvariablewith type signatureconstant_variable_declarationconstantimport_directiveimportBenchmark
Notes
tree-sitter-solidity@1.2.13(same vendoring pattern as Lua, Luau, Pascal, Scala)constructor_definitionandfallback_receive_definitionhave nonamefield in the AST — handled via thevisitNodehook, naming them"constructor","fallback", or"receive"respectivelyexternalvisibility is mapped topublicin the graph (it means callable from outside the contract)🤖 Generated with Claude Code