()
| 80 | } |
| 81 | |
| 82 | pub(crate) fn valid_ident() -> &'static Regex { |
| 83 | static VALID_IDENT: OnceLock<Regex> = OnceLock::new(); |
| 84 | VALID_IDENT.get_or_init(|| { |
| 85 | // One of: |
| 86 | // - `*` |
| 87 | // - An ident starting with `a-z_\$` and containing other characters `a-z0-9_\$` |
| 88 | // |
| 89 | // We could replace this with pomsky (regex<>pomsky : sql<>prql) |
| 90 | // ^ ('*' | [ascii_lower '_$'] [ascii_lower ascii_digit '_$']* ) $ |
| 91 | Regex::new(r"^((\*)|(^[a-z_\$][a-z0-9_\$]*))$").unwrap() |
| 92 | }) |
| 93 | } |
| 94 | |
| 95 | fn should_use_color() -> bool { |
| 96 | match anstream::AutoStream::choice(&stderr()) { |
no outgoing calls
no test coverage detected