Skip to content

Commit c9022e3

Browse files
committed
fix: resolve merge conflicts with main (Solidity native port)
docs check acknowledged
2 parents 20f988b + edd60a8 commit c9022e3

12 files changed

Lines changed: 700 additions & 14 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-julia = "0.23"
4040
tree-sitter-clojure-orchard = "0.2"
4141
tree-sitter-r = "1.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
@@ -405,6 +405,16 @@ pub const R_AST_CONFIG: LangAstConfig = LangAstConfig {
405405
string_prefixes: &[],
406406
};
407407

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

410420
/// 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 r_lang;
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::R => {
143144
r_lang::RExtractor.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)