MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / plain_member_name

Method plain_member_name

codegraph-kernel/src/tsjs/extractors.rs:1847–1858  ·  view source on GitHub ↗
(source: &str)

Source from the content-addressed store, hash-verified

1845 }
1846
1847 fn plain_member_name(source: &str) -> Option<String> {
1848 let text: String = source.chars().filter(|c| !c.is_whitespace()).collect();
1849 if text.is_empty() {
1850 return None;
1851 }
1852 let ok = text.split('.').all(|seg| {
1853 let mut chars = seg.chars();
1854 matches!(chars.next(), Some(c) if c.is_ascii_alphabetic() || c == '_' || c == '$')
1855 && chars.all(|c| c.is_ascii_alphanumeric() || c == '_' || c == '$')
1856 });
1857 if ok { Some(text) } else { None }
1858 }
1859
1860 pub(super) fn extract_instantiation(&mut self, node: Node<'t>) {
1861 if self.stack.is_empty() {

Callers

nothing calls this directly

Calls 2

allMethod · 0.65
collectMethod · 0.45

Tested by

no test coverage detected