JS `/<[^>]*>/g` — the non-nested generic strip (breaks on nested generics by design: `Result , E>` → `Result, E>` → returnType undefined).
()
| 61 | /// JS `/<[^>]*>/g` — the non-nested generic strip (breaks on nested generics |
| 62 | /// by design: `Result<Vec<Foo>, E>` → `Result, E>` → returnType undefined). |
| 63 | fn generic_angle_re() -> &'static Regex { |
| 64 | static RE: OnceLock<Regex> = OnceLock::new(); |
| 65 | RE.get_or_init(|| Regex::new(r"<[^>]*>").unwrap()) |
| 66 | } |
| 67 | /// JS `/^[A-Za-z_]\w*$/` (ASCII \w — the regex crate's \w is Unicode). |
| 68 | fn simple_ident_re() -> &'static Regex { |
| 69 | static RE: OnceLock<Regex> = OnceLock::new(); |