startsExpr.
(tokens: &[Node], i: usize, src: &str)
| 2045 | |
| 2046 | /// startsExpr. |
| 2047 | fn macro_starts_expr(tokens: &[Node], i: usize, src: &str) -> bool { |
| 2048 | let t = tokens[i]; |
| 2049 | match t.kind() { |
| 2050 | "self" | "crate" | "super" | "::" | "token_tree" => true, |
| 2051 | "primitive_type" => tokens.get(i + 1).map(|n| n.kind() == "::").unwrap_or(false), |
| 2052 | k => macro_is_name(Some(&t), src) || MACRO_ARG_LITERALS.contains(&k), |
| 2053 | } |
| 2054 | } |
| 2055 | |
| 2056 | /// skipAngles: past a turbofish's `<…>` that starts at `i`, or None. |
| 2057 | fn macro_skip_angles(tokens: &[Node], i: usize) -> Option<usize> { |
no test coverage detected