Skip to content

Commit 91b9d5b

Browse files
committed
fix: resolve merge conflicts with main (R + ObjC) (docs check acknowledged)
Resolved merge with origin/main (44a3505 R extractor). Combined both ObjC and R additions to: - crates/codegraph-core/src/file_collector.rs SUPPORTED_EXTENSIONS (keep both 'm' and 'r'/'R') - crates/codegraph-core/src/parser_registry.rs LanguageKind::all() (keep ObjC and R in declaration order) - Bumped EXPECTED_LEN from 30 to 31 to match the new variant count. - tests/parsers/native-drop-classification.test.ts: decrement the unsupported-by-native count from 6 to 5 since the merge correctly removed 'src/k.m' from the input array (ObjC is now natively supported) but main's side of the conflict left the old count. This is a merge resolution — no new features, no doc changes needed (ObjC language support docs were already added in an earlier commit on this branch; R docs landed on main with #1102).
2 parents 29ad42a + 44a3505 commit 91b9d5b

13 files changed

Lines changed: 603 additions & 11 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
@@ -40,6 +40,7 @@ tree-sitter-objc = "3"
4040
tree-sitter-julia = "0.23"
4141
tree-sitter-clojure-orchard = "0.2"
4242
tree-sitter-erlang = "0.16"
43+
tree-sitter-r = "1.2"
4344
tree-sitter-solidity = "1.2"
4445
rayon = "1"
4546
ignore = "0.4"

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,17 @@ pub const ERLANG_AST_CONFIG: LangAstConfig = LangAstConfig {
417417
string_prefixes: &[],
418418
};
419419

420+
pub const R_AST_CONFIG: LangAstConfig = LangAstConfig {
421+
new_types: &[],
422+
throw_types: &[],
423+
await_types: &[],
424+
// tree-sitter-r emits `string` for both single- and double-quoted literals.
425+
string_types: &["string"],
426+
regex_types: &[],
427+
quote_chars: &['\'', '"'],
428+
string_prefixes: &[],
429+
};
430+
420431
pub const SOLIDITY_AST_CONFIG: LangAstConfig = LangAstConfig {
421432
new_types: &["new_expression"],
422433
throw_types: &["revert_statement"],

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ pub mod objc;
2020
pub mod ocaml;
2121
pub mod php;
2222
pub mod python;
23+
pub mod r_lang;
2324
pub mod ruby;
2425
pub mod rust_lang;
2526
pub mod scala;
@@ -147,6 +148,9 @@ pub fn extract_symbols_with_opts(
147148
LanguageKind::Erlang => {
148149
erlang::ErlangExtractor.extract_with_opts(tree, source, file_path, include_ast_nodes)
149150
}
151+
LanguageKind::R => {
152+
r_lang::RExtractor.extract_with_opts(tree, source, file_path, include_ast_nodes)
153+
}
150154
LanguageKind::Solidity => {
151155
solidity::SolidityExtractor.extract_with_opts(tree, source, file_path, include_ast_nodes)
152156
}

0 commit comments

Comments
 (0)