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