`/^[A-Za-z_]\w*$/` with JS's ASCII `\w` (Rust's default `\w` is Unicode).
()
| 82 | } |
| 83 | /// `/^[A-Za-z_]\w*$/` with JS's ASCII `\w` (Rust's default `\w` is Unicode). |
| 84 | fn ascii_ident_re() -> &'static Regex { |
| 85 | static RE: OnceLock<Regex> = OnceLock::new(); |
| 86 | RE.get_or_init(|| Regex::new(r"^[A-Za-z_][0-9A-Za-z_]*$").unwrap()) |
| 87 | } |
| 88 | /// extractStaticMemberRef's capitalized-receiver test. |
| 89 | fn capitalized_re() -> &'static Regex { |
| 90 | static RE: OnceLock<Regex> = OnceLock::new(); |