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

Method plain_member_name

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

Source from the content-addressed store, hash-verified

1998 }
1999
2000 fn plain_member_name(source: &str) -> Option<String> {
2001 let text: String = source.chars().filter(|c| !c.is_whitespace()).collect();
2002 if text.is_empty() {
2003 return None;
2004 }
2005 let ok = text.split('.').all(|seg| {
2006 let mut chars = seg.chars();
2007 matches!(chars.next(), Some(c) if c.is_ascii_alphabetic() || c == '_' || c == '$')
2008 && chars.all(|c| c.is_ascii_alphanumeric() || c == '_' || c == '$')
2009 });
2010 if ok { Some(text) } else { None }
2011 }
2012
2013 pub(super) fn extract_instantiation(&mut self, node: Node<'t>) {
2014 if self.stack.is_empty() {

Callers

nothing calls this directly

Calls 2

allMethod · 0.65
collectMethod · 0.45

Tested by

no test coverage detected