startsExpr.
(tokens: &[Node], i: usize, src: &str)
| 2286 | |
| 2287 | /// startsExpr. |
| 2288 | fn macro_starts_expr(tokens: &[Node], i: usize, src: &str) -> bool { |
| 2289 | let t = tokens[i]; |
| 2290 | match t.kind() { |
| 2291 | "self" | "crate" | "super" | "::" | "token_tree" => true, |
| 2292 | "primitive_type" => tokens.get(i + 1).map(|n| n.kind() == "::").unwrap_or(false), |
| 2293 | k => macro_is_name(Some(&t), src) || MACRO_ARG_LITERALS.contains(&k), |
| 2294 | } |
| 2295 | } |
| 2296 | |
| 2297 | /// skipAngles: past a turbofish's `<…>` that starts at `i`, or None. |
| 2298 | fn macro_skip_angles(tokens: &[Node], i: usize) -> Option<usize> { |
no test coverage detected