Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,7 @@ mod tests {
complexity: None,
cfg: None,
children: None,
bodyless: None,
})
.collect(),
imports,
Expand Down
1 change: 1 addition & 0 deletions crates/codegraph-core/src/extractors/bash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ fn match_bash_node(node: &Node, source: &[u8], symbols: &mut FileSymbols, _depth
complexity: compute_all_metrics(node, source, "bash"),
cfg: build_function_cfg(node, "bash", source),
children: None,
bodyless: None,
});
}
}
Expand Down
5 changes: 5 additions & 0 deletions crates/codegraph-core/src/extractors/c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ fn match_c_node(node: &Node, source: &[u8], symbols: &mut FileSymbols, _depth: u
complexity: compute_all_metrics(node, source, "c"),
cfg: build_function_cfg(node, "c", source),
children: opt_children(children),
bodyless: None,
});
}
}
Expand All @@ -212,6 +213,7 @@ fn match_c_node(node: &Node, source: &[u8], symbols: &mut FileSymbols, _depth: u
complexity: None,
cfg: None,
children: opt_children(children),
bodyless: None,
});
}
}
Expand All @@ -230,6 +232,7 @@ fn match_c_node(node: &Node, source: &[u8], symbols: &mut FileSymbols, _depth: u
complexity: None,
cfg: None,
children: opt_children(children),
bodyless: None,
});
}
}
Expand All @@ -246,6 +249,7 @@ fn match_c_node(node: &Node, source: &[u8], symbols: &mut FileSymbols, _depth: u
complexity: None,
cfg: None,
children: opt_children(children),
bodyless: None,
});
}
}
Expand Down Expand Up @@ -274,6 +278,7 @@ fn match_c_node(node: &Node, source: &[u8], symbols: &mut FileSymbols, _depth: u
complexity: None,
cfg: None,
children: None,
bodyless: None,
});
}
}
Expand Down
5 changes: 5 additions & 0 deletions crates/codegraph-core/src/extractors/clojure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ fn handle_ns_form(node: &Node, source: &[u8], symbols: &mut FileSymbols) -> Opti
complexity: None,
cfg: None,
children: None,
bodyless: None,
});

// Scan for nested `(:require ...)`, `(:import ...)`, `(:use ...)` forms.
Expand Down Expand Up @@ -269,6 +270,7 @@ fn handle_def_form(
complexity: None,
cfg: None,
children: None,
bodyless: None,
});
}

Expand Down Expand Up @@ -302,6 +304,7 @@ fn handle_defn_form(
complexity: compute_all_metrics(node, source, "clojure"),
cfg: build_function_cfg(node, "clojure", source),
children: opt_children(params),
bodyless: None,
});
}

Expand Down Expand Up @@ -351,6 +354,7 @@ fn handle_defprotocol(node: &Node, source: &[u8], symbols: &mut FileSymbols) {
complexity: None,
cfg: None,
children: None,
bodyless: None,
});
}

Expand All @@ -368,6 +372,7 @@ fn handle_defrecord(node: &Node, source: &[u8], symbols: &mut FileSymbols, kind:
complexity: None,
cfg: None,
children: None,
bodyless: None,
});
}

Expand Down
6 changes: 6 additions & 0 deletions crates/codegraph-core/src/extractors/cpp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ fn handle_cpp_function_definition(node: &Node, source: &[u8], symbols: &mut File
complexity: compute_all_metrics(node, source, "cpp"),
cfg: build_function_cfg(node, "cpp", source),
children: opt_children(children),
bodyless: None,
});
}
}
Expand All @@ -222,6 +223,7 @@ fn handle_cpp_class_specifier(node: &Node, source: &[u8], symbols: &mut FileSymb
complexity: None,
cfg: None,
children: opt_children(children),
bodyless: None,
});
extract_cpp_base_classes(node, source, &class_name, symbols);
}
Expand All @@ -242,6 +244,7 @@ fn handle_cpp_struct_specifier(node: &Node, source: &[u8], symbols: &mut FileSym
complexity: None,
cfg: None,
children: opt_children(children),
bodyless: None,
});
extract_cpp_base_classes(node, source, &struct_name, symbols);
}
Expand All @@ -259,6 +262,7 @@ fn handle_cpp_enum_specifier(node: &Node, source: &[u8], symbols: &mut FileSymbo
complexity: None,
cfg: None,
children: opt_children(children),
bodyless: None,
});
}
}
Expand All @@ -274,6 +278,7 @@ fn handle_cpp_namespace_definition(node: &Node, source: &[u8], symbols: &mut Fil
complexity: None,
cfg: None,
children: None,
bodyless: None,
});
}
}
Expand Down Expand Up @@ -301,6 +306,7 @@ fn handle_cpp_type_definition(node: &Node, source: &[u8], symbols: &mut FileSymb
complexity: None,
cfg: None,
children: None,
bodyless: None,
});
}
}
Expand Down
8 changes: 8 additions & 0 deletions crates/codegraph-core/src/extractors/csharp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ fn handle_class_decl(node: &Node, source: &[u8], symbols: &mut FileSymbols) {
complexity: None,
cfg: None,
children: opt_children(children),
bodyless: None,
});
extract_csharp_base_types(node, &class_name, source, symbols);
}
Expand All @@ -77,6 +78,7 @@ fn handle_struct_decl(node: &Node, source: &[u8], symbols: &mut FileSymbols) {
complexity: None,
cfg: None,
children: None,
bodyless: None,
});
extract_csharp_base_types(node, &name, source, symbols);
}
Expand All @@ -93,6 +95,7 @@ fn handle_record_decl(node: &Node, source: &[u8], symbols: &mut FileSymbols) {
complexity: None,
cfg: None,
children: None,
bodyless: None,
});
extract_csharp_base_types(node, &name, source, symbols);
}
Expand All @@ -109,6 +112,7 @@ fn handle_interface_decl(node: &Node, source: &[u8], symbols: &mut FileSymbols)
complexity: None,
cfg: None,
children: None,
bodyless: None,
});
if let Some(body) = node.child_by_field_name("body") {
for i in 0..body.child_count() {
Expand All @@ -127,6 +131,7 @@ fn handle_interface_decl(node: &Node, source: &[u8], symbols: &mut FileSymbols)
complexity: None,
cfg: None,
children: None,
bodyless: Some(child.child_by_field_name("body").is_none()),
});
}
}
Expand All @@ -146,6 +151,7 @@ fn handle_enum_decl(node: &Node, source: &[u8], symbols: &mut FileSymbols) {
complexity: None,
cfg: None,
children: opt_children(children),
bodyless: None,
});
}
}
Expand All @@ -168,6 +174,7 @@ fn handle_method_or_ctor(node: &Node, source: &[u8], symbols: &mut FileSymbols)
complexity: compute_all_metrics(node, source, "csharp"),
cfg: build_function_cfg(node, "csharp", source),
children: opt_children(children),
bodyless: Some(node.child_by_field_name("body").is_none()),
});
}

Expand Down Expand Up @@ -204,6 +211,7 @@ fn handle_property_decl(node: &Node, source: &[u8], symbols: &mut FileSymbols) {
complexity: None,
cfg: None,
children: None,
bodyless: None,
});
}

Expand Down
6 changes: 6 additions & 0 deletions crates/codegraph-core/src/extractors/cuda.rs
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ fn handle_cuda_function_definition(node: &Node, source: &[u8], symbols: &mut Fil
complexity: compute_all_metrics(node, source, "cpp"),
cfg: build_function_cfg(node, "cpp", source),
children: opt_children(children),
bodyless: None,
});
}
}
Expand All @@ -382,6 +383,7 @@ fn handle_cuda_class_specifier(node: &Node, source: &[u8], symbols: &mut FileSym
complexity: None,
cfg: None,
children: opt_children(children),
bodyless: None,
});
extract_cuda_base_classes(node, source, &class_name, symbols);
}
Expand All @@ -403,6 +405,7 @@ fn handle_cuda_struct_specifier(node: &Node, source: &[u8], symbols: &mut FileSy
complexity: None,
cfg: None,
children: opt_children(children),
bodyless: None,
});
}
}
Expand All @@ -419,6 +422,7 @@ fn handle_cuda_enum_specifier(node: &Node, source: &[u8], symbols: &mut FileSymb
complexity: None,
cfg: None,
children: opt_children(children),
bodyless: None,
});
}
}
Expand All @@ -434,6 +438,7 @@ fn handle_cuda_namespace_definition(node: &Node, source: &[u8], symbols: &mut Fi
complexity: None,
cfg: None,
children: None,
bodyless: None,
});
}
}
Expand Down Expand Up @@ -464,6 +469,7 @@ fn handle_cuda_type_definition(node: &Node, source: &[u8], symbols: &mut FileSym
complexity: None,
cfg: None,
children: None,
bodyless: None,
});
}
}
Expand Down
7 changes: 7 additions & 0 deletions crates/codegraph-core/src/extractors/dart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ fn handle_dart_class(node: &Node, source: &[u8], symbols: &mut FileSymbols) {
complexity: None,
cfg: None,
children: None,
bodyless: None,
});
}

Expand Down Expand Up @@ -148,6 +149,7 @@ fn extract_dart_class_methods(body: &Node, class_name: &str, source: &[u8], symb
complexity: compute_all_metrics(&sig, source, "dart"),
cfg: build_function_cfg(&sig, "dart", source),
children: None,
bodyless: None,
});
}
}
Expand Down Expand Up @@ -202,6 +204,7 @@ fn handle_dart_enum(node: &Node, source: &[u8], symbols: &mut FileSymbols) {
complexity: None,
cfg: None,
children: None,
bodyless: None,
});
}

Expand All @@ -220,6 +223,7 @@ fn handle_dart_mixin(node: &Node, source: &[u8], symbols: &mut FileSymbols) {
complexity: None,
cfg: None,
children: None,
bodyless: None,
});
}

Expand All @@ -238,6 +242,7 @@ fn handle_dart_extension(node: &Node, source: &[u8], symbols: &mut FileSymbols)
complexity: None,
cfg: None,
children: None,
bodyless: None,
});
}

Expand All @@ -256,6 +261,7 @@ fn handle_dart_function_sig(node: &Node, source: &[u8], symbols: &mut FileSymbol
complexity: compute_all_metrics(node, source, "dart"),
cfg: build_function_cfg(node, "dart", source),
children: None,
bodyless: None,
});
}

Expand Down Expand Up @@ -305,6 +311,7 @@ fn handle_dart_type_alias(node: &Node, source: &[u8], symbols: &mut FileSymbols)
complexity: None,
cfg: None,
children: None,
bodyless: None,
});
}
}
Expand Down
4 changes: 4 additions & 0 deletions crates/codegraph-core/src/extractors/elixir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ fn handle_defmodule(node: &Node, source: &[u8], symbols: &mut FileSymbols) {
complexity: None,
cfg: None,
children: opt_children(children),
bodyless: None,
});
}

Expand Down Expand Up @@ -142,6 +143,7 @@ fn handle_def_function(node: &Node, source: &[u8], symbols: &mut FileSymbols, _k
complexity: compute_all_metrics(node, source, "elixir"),
cfg: build_function_cfg(node, "elixir", source),
children: opt_children(params),
bodyless: None,
});
}

Expand Down Expand Up @@ -325,6 +327,7 @@ fn handle_defprotocol(node: &Node, source: &[u8], symbols: &mut FileSymbols) {
complexity: None,
cfg: None,
children: None,
bodyless: None,
});
}

Expand All @@ -347,6 +350,7 @@ fn handle_defimpl(node: &Node, source: &[u8], symbols: &mut FileSymbols) {
complexity: None,
cfg: None,
children: None,
bodyless: None,
});
}

Expand Down
5 changes: 5 additions & 0 deletions crates/codegraph-core/src/extractors/erlang.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ fn handle_module_attr(node: &Node, source: &[u8], symbols: &mut FileSymbols) {
complexity: None,
cfg: None,
children: None,
bodyless: None,
});
}

Expand Down Expand Up @@ -97,6 +98,7 @@ fn handle_record_decl(node: &Node, source: &[u8], symbols: &mut FileSymbols) {
complexity: None,
cfg: None,
children: opt_children(children),
bodyless: None,
});
}

Expand All @@ -123,6 +125,7 @@ fn handle_type_alias(node: &Node, source: &[u8], symbols: &mut FileSymbols) {
complexity: None,
cfg: None,
children: None,
bodyless: None,
});
}

Expand Down Expand Up @@ -175,6 +178,7 @@ fn handle_function_clause(node: &Node, source: &[u8], symbols: &mut FileSymbols)
complexity: None,
cfg: None,
children: opt_children(params),
bodyless: None,
});
}

Expand Down Expand Up @@ -244,6 +248,7 @@ fn handle_define(node: &Node, source: &[u8], symbols: &mut FileSymbols) {
complexity: None,
cfg: None,
children: None,
bodyless: None,
});
}

Expand Down
Loading
Loading