Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/codegraph-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ tree-sitter-ocaml = "0.24"
tree-sitter-julia = "0.23"
tree-sitter-clojure-orchard = "0.2"
tree-sitter-erlang = "0.16"
tree-sitter-r = "1.2"
tree-sitter-solidity = "1.2"
rayon = "1"
ignore = "0.4"
Expand Down
11 changes: 11 additions & 0 deletions crates/codegraph-core/src/extractors/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,17 @@ pub const ERLANG_AST_CONFIG: LangAstConfig = LangAstConfig {
string_prefixes: &[],
};

pub const R_AST_CONFIG: LangAstConfig = LangAstConfig {
new_types: &[],
throw_types: &[],
await_types: &[],
// tree-sitter-r emits `string` for both single- and double-quoted literals.
string_types: &["string"],
regex_types: &[],
quote_chars: &['\'', '"'],
string_prefixes: &[],
};

pub const SOLIDITY_AST_CONFIG: LangAstConfig = LangAstConfig {
new_types: &["new_expression"],
throw_types: &["revert_statement"],
Expand Down
4 changes: 4 additions & 0 deletions crates/codegraph-core/src/extractors/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ pub mod lua;
pub mod ocaml;
pub mod php;
pub mod python;
pub mod r_lang;
pub mod ruby;
pub mod rust_lang;
pub mod scala;
Expand Down Expand Up @@ -143,6 +144,9 @@ pub fn extract_symbols_with_opts(
LanguageKind::Erlang => {
erlang::ErlangExtractor.extract_with_opts(tree, source, file_path, include_ast_nodes)
}
LanguageKind::R => {
r_lang::RExtractor.extract_with_opts(tree, source, file_path, include_ast_nodes)
}
LanguageKind::Solidity => {
solidity::SolidityExtractor.extract_with_opts(tree, source, file_path, include_ast_nodes)
}
Expand Down
Loading
Loading