`/^[A-Za-z_]\w*$/` with JS's ASCII `\w` (getReturnType's ident test).
()
| 65 | |
| 66 | /// `/^[A-Za-z_]\w*$/` with JS's ASCII `\w` (getReturnType's ident test). |
| 67 | fn ascii_ident_re() -> &'static Regex { |
| 68 | static RE: OnceLock<Regex> = OnceLock::new(); |
| 69 | RE.get_or_init(|| Regex::new(r"^[A-Za-z_][0-9A-Za-z_]*$").unwrap()) |
| 70 | } |
| 71 | /// extractStaticMemberRef's capitalized-receiver test. |
| 72 | fn capitalized_re() -> &'static Regex { |
| 73 | static RE: OnceLock<Regex> = OnceLock::new(); |