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

Function lexical_container

atomic-semantic/src/source.rs:165–181  ·  view source on GitHub ↗
(mut node: Node<'_>)

Source from the content-addressed store, hash-verified

163}
164
165fn lexical_container(mut node: Node<'_>) -> Node<'_> {
166 while let Some(parent) = node.parent() {
167 if matches!(
168 parent.kind(),
169 "block"
170 | "statement_block"
171 | "source_file"
172 | "program"
173 | "declaration_list"
174 | "class_body"
175 ) {
176 return parent;
177 }
178 node = parent;
179 }
180 node
181}
182
183fn parameters(mut node: Node<'_>) -> Option<Node<'_>> {
184 for _ in 0..16 {

Callers 2

rust_importFunction · 0.85
from_treeMethod · 0.85

Calls 1

parentMethod · 0.80

Tested by

no test coverage detected