isSegment.
(t: Option<&Node>, src: &str)
| 2047 | |
| 2048 | /// isSegment. |
| 2049 | fn macro_is_segment(t: Option<&Node>, src: &str) -> bool { |
| 2050 | match t { |
| 2051 | None => false, |
| 2052 | Some(n) => macro_is_name(t, src) || matches!(n.kind(), "self" | "super" | "crate" | "primitive_type"), |
| 2053 | } |
| 2054 | } |
| 2055 | |
| 2056 | /// parseChain: the expression that starts at `i`; returns the index past it. |
| 2057 | 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