`/^[A-Za-z_]\w*$/` with JS's ASCII `\w` (Rust's default `\w` is Unicode).
()
| 71 | } |
| 72 | /// `/^[A-Za-z_]\w*$/` with JS's ASCII `\w` (Rust's default `\w` is Unicode). |
| 73 | fn ascii_ident_re() -> &'static Regex { |
| 74 | static RE: OnceLock<Regex> = OnceLock::new(); |
| 75 | RE.get_or_init(|| Regex::new(r"^[A-Za-z_][0-9A-Za-z_]*$").unwrap()) |
| 76 | } |
| 77 | /// extractStaticMemberRef's capitalized-receiver test. |
| 78 | fn capitalized_re() -> &'static Regex { |
| 79 | static RE: OnceLock<Regex> = OnceLock::new(); |