feat(extraction): add Solidity language support (.sol) (#374, #648) (#1170)

Contracts/libraries/interfaces, structs, enums, modifiers, events, errors,
state variables; call edges for emit/revert/modifier guards/base-constructor
chains/library calls; is-inheritance with implements reclassification;
import resolution. Validated on solmate, solady, openzeppelin-contracts.

Lands #667.

Co-authored-by: naiba <hi@nai.ba>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Colby Mchenry
2026-07-03 16:05:03 -05:00
committed by GitHub
co-authored by naiba Claude Fable 5
parent a0208feaac
commit 1441933a26
9 changed files with 546 additions and 1 deletions
+3
View File
@@ -45,6 +45,7 @@ const WASM_GRAMMAR_FILES: Record<GrammarLanguage, string> = {
cobol: 'tree-sitter-cobol.wasm',
vbnet: 'tree-sitter-vbnet.wasm',
erlang: 'tree-sitter-erlang.wasm',
solidity: 'tree-sitter-solidity.wasm',
};
/**
@@ -114,6 +115,7 @@ export const EXTENSION_MAP: Record<string, Language> = {
'.luau': 'luau',
'.m': 'objc',
'.mm': 'objc',
'.sol': 'solidity',
// CFML: .cfc/.cfm parse with the tag-aware `cfml` grammar (custom CfmlExtractor
// dialect-switches to cfscript for bare-script content); .cfs is pure CFScript.
'.cfc': 'cfml',
@@ -489,6 +491,7 @@ export function getLanguageDisplayName(language: Language): string {
lua: 'Lua',
luau: 'Luau',
objc: 'Objective-C',
solidity: 'Solidity',
yaml: 'YAML',
twig: 'Twig',
xml: 'XML',