`/^[A-Za-z_]\w*$/` with JS's ASCII `\w`.
()
| 83 | |
| 84 | /// `/^[A-Za-z_]\w*$/` with JS's ASCII `\w`. |
| 85 | fn ascii_ident_re() -> &'static Regex { |
| 86 | static RE: OnceLock<Regex> = OnceLock::new(); |
| 87 | RE.get_or_init(|| Regex::new(r"^[A-Za-z_][0-9A-Za-z_]*$").unwrap()) |
| 88 | } |
| 89 | /// getReturnType's generics strip (`/<[^>]*>/g`) — non-nesting (rust-class quirk). |
| 90 | fn generic_args_re() -> &'static Regex { |
| 91 | static RE: OnceLock<Regex> = OnceLock::new(); |