MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / declarator

Function declarator

atomic-audit/src/extract/languages.rs:110–121  ·  view source on GitHub ↗
(mut node: Node<'_>)

Source from the content-addressed store, hash-verified

108}
109
110fn declarator(mut node: Node<'_>) -> Option<Node<'_>> {
111 for _ in 0..16 {
112 if matches!(
113 node.kind(),
114 "function_declarator" | "abstract_function_declarator" | "lambda_declarator"
115 ) {
116 return Some(node);
117 }
118 node = node.child_by_field_name("declarator")?;
119 }
120 None
121}
122
123pub(crate) fn body(node: Node<'_>, language: Language) -> Option<Node<'_>> {
124 node.child_by_field_name("body").or_else(|| {

Callers 4

callableFunction · 0.85
node_nameFunction · 0.85
parametersFunction · 0.85
namesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected