isSegment.
(t: Option<&Node>, src: &str)
| 2078 | |
| 2079 | /// isSegment. |
| 2080 | fn macro_is_segment(t: Option<&Node>, src: &str) -> bool { |
| 2081 | match t { |
| 2082 | None => false, |
| 2083 | Some(n) => macro_is_name(t, src) || matches!(n.kind(), "self" | "super" | "crate" | "primitive_type"), |
| 2084 | } |
| 2085 | } |
| 2086 | |
| 2087 | /// parseChain: the expression that starts at `i`; returns the index past it. |
| 2088 | fn macro_parse_chain<'t>(tokens: &[Node<'t>], mut i: usize, in_pattern: bool, src: &'t str, out: &mut Vec<MacroRef<'t>>) -> usize { |
no test coverage detected