Skip to content

Commit 7fb5e71

Browse files
committed
fix: resolve merge conflicts with main (Solidity)
2 parents 7294941 + edd60a8 commit 7fb5e71

12 files changed

Lines changed: 699 additions & 13 deletions

File tree

Cargo.lock

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/codegraph-core/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ tree-sitter-ocaml = "0.24"
3939
tree-sitter-objc = "3"
4040
tree-sitter-julia = "0.23"
4141
tree-sitter-clojure-orchard = "0.2"
42+
tree-sitter-solidity = "1.2"
4243
rayon = "1"
4344
ignore = "0.4"
4445
globset = "0.4"

crates/codegraph-core/src/extractors/helpers.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,16 @@ pub const CLOJURE_AST_CONFIG: LangAstConfig = LangAstConfig {
407407
string_prefixes: &[],
408408
};
409409

410+
pub const SOLIDITY_AST_CONFIG: LangAstConfig = LangAstConfig {
411+
new_types: &["new_expression"],
412+
throw_types: &["revert_statement"],
413+
await_types: &[],
414+
string_types: &["string_literal", "hex_string_literal", "unicode_string_literal"],
415+
regex_types: &[],
416+
quote_chars: &['"', '\''],
417+
string_prefixes: &[],
418+
};
419+
410420
// ── Generic AST node walker ──────────────────────────────────────────────────
411421

412422
/// Node types that represent identifiers across languages.

crates/codegraph-core/src/extractors/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ pub mod python;
2222
pub mod ruby;
2323
pub mod rust_lang;
2424
pub mod scala;
25+
pub mod solidity;
2526
pub mod swift;
2627
pub mod zig;
2728

@@ -142,5 +143,8 @@ pub fn extract_symbols_with_opts(
142143
LanguageKind::Clojure => {
143144
clojure::ClojureExtractor.extract_with_opts(tree, source, file_path, include_ast_nodes)
144145
}
146+
LanguageKind::Solidity => {
147+
solidity::SolidityExtractor.extract_with_opts(tree, source, file_path, include_ast_nodes)
148+
}
145149
}
146150
}

0 commit comments

Comments
 (0)