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

Method plain_member_name

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

Source from the content-addressed store, hash-verified

1983 }
1984
1985 fn plain_member_name(source: &str) -> Option<String> {
1986 let text: String = source.chars().filter(|c| !c.is_whitespace()).collect();
1987 if text.is_empty() {
1988 return None;
1989 }
1990 let ok = text.split('.').all(|seg| {
1991 let mut chars = seg.chars();
1992 matches!(chars.next(), Some(c) if c.is_ascii_alphabetic() || c == '_' || c == '$')
1993 && chars.all(|c| c.is_ascii_alphanumeric() || c == '_' || c == '$')
1994 });
1995 if ok { Some(text) } else { None }
1996 }
1997
1998 pub(super) fn extract_instantiation(&mut self, node: Node<'t>) {
1999 if self.stack.is_empty() {

Callers

nothing calls this directly

Calls 2

allMethod · 0.65
collectMethod · 0.45

Tested by

no test coverage detected