startsExpr.
(tokens: &[Node], i: usize, src: &str)
| 2014 | |
| 2015 | /// startsExpr. |
| 2016 | fn macro_starts_expr(tokens: &[Node], i: usize, src: &str) -> bool { |
| 2017 | let t = tokens[i]; |
| 2018 | match t.kind() { |
| 2019 | "self" | "crate" | "super" | "::" | "token_tree" => true, |
| 2020 | "primitive_type" => tokens.get(i + 1).map(|n| n.kind() == "::").unwrap_or(false), |
| 2021 | k => macro_is_name(Some(&t), src) || MACRO_ARG_LITERALS.contains(&k), |
| 2022 | } |
| 2023 | } |
| 2024 | |
| 2025 | /// skipAngles: past a turbofish's `<…>` that starts at `i`, or None. |
| 2026 | fn macro_skip_angles(tokens: &[Node], i: usize) -> Option<usize> { |
no test coverage detected