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

Function tail

atomic-audit/src/substantive/mod.rs:67–85  ·  view source on GitHub ↗
(mut node: Node<'_>)

Source from the content-addressed store, hash-verified

65}
66
67fn tail(mut node: Node<'_>) -> Node<'_> {
68 loop {
69 if matches!(
70 node.kind(),
71 "block"
72 | "statement_block"
73 | "return_expression"
74 | "return_statement"
75 | "expression_statement"
76 | "parenthesized_expression"
77 ) {
78 if let Some(child) = code_children(node).last() {
79 node = *child;
80 continue;
81 }
82 }
83 return node;
84 }
85}
86
87pub(crate) fn inspect(
88 language: Language,

Callers 2

forwarding_wrapperFunction · 0.85
inspectFunction · 0.85

Calls 2

code_childrenFunction · 0.85
lastMethod · 0.80

Tested by

no test coverage detected