Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -36,6 +36,7 @@ tree-sitter-dart = "0.0.4"
tree-sitter-zig = "1"
tree-sitter-haskell = "0.23"
tree-sitter-ocaml = "0.24"
tree-sitter-objc = "3"
tree-sitter-gleam = "1"
tree-sitter-julia = "0.23"
tree-sitter-clojure-orchard = "0.2"
Expand Down
13 changes: 13 additions & 0 deletions crates/codegraph-core/src/extractors/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,19 @@ pub const OCAML_AST_CONFIG: LangAstConfig = LangAstConfig {
string_prefixes: &[],
};

/// Objective-C string literals use the `@"..."` prefix. The shared
/// `build_string_node` strips a leading `@` before applying prefixes, so we
/// don't need to list it explicitly here.
pub const OBJC_AST_CONFIG: LangAstConfig = LangAstConfig {
new_types: &[],
throw_types: &["throw_statement"],
await_types: &[],
string_types: &["string_literal"],
regex_types: &[],
quote_chars: &['"'],
string_prefixes: &[],
};

pub const GLEAM_AST_CONFIG: LangAstConfig = LangAstConfig {
new_types: &[],
throw_types: &[],
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 @@ -18,6 +18,7 @@ pub mod javascript;
pub mod julia;
pub mod kotlin;
pub mod lua;
pub mod objc;
pub mod ocaml;
pub mod php;
pub mod python;
Expand Down Expand Up @@ -137,6 +138,9 @@ pub fn extract_symbols_with_opts(
LanguageKind::Ocaml | LanguageKind::OcamlInterface => {
ocaml::OcamlExtractor.extract_with_opts(tree, source, file_path, include_ast_nodes)
}
LanguageKind::ObjC => {
objc::ObjCExtractor.extract_with_opts(tree, source, file_path, include_ast_nodes)
}
LanguageKind::Gleam => {
gleam::GleamExtractor.extract_with_opts(tree, source, file_path, include_ast_nodes)
}
Expand Down
Loading
Loading