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

Method is_pub

atomic-semantic/src/parsers/rust.rs:482–486  ·  view source on GitHub ↗

Check if a node has a `pub` visibility modifier.

(&self, node: &Node)

Source from the content-addressed store, hash-verified

480
481 /// Check if a node has a `pub` visibility modifier.
482 fn is_pub(&self, node: &Node) -> bool {
483 let mut cursor = node.walk();
484 let children: Vec<_> = node.children(&mut cursor).collect();
485 children.iter().any(|c| c.kind() == "visibility_modifier")
486 }
487
488 /// Get the text content of a node.
489 fn node_text(&self, node: &Node, source: &str) -> String {

Callers 10

extract_functionMethod · 0.80
extract_structMethod · 0.80
extract_enumMethod · 0.80
extract_traitMethod · 0.80
extract_type_aliasMethod · 0.80
extract_constMethod · 0.80
extract_staticMethod · 0.80
extract_modMethod · 0.80
build_trait_signatureMethod · 0.80

Calls 4

walkMethod · 0.80
childrenMethod · 0.80
iterMethod · 0.45
kindMethod · 0.45

Tested by

no test coverage detected