| 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() { |