mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-22 03:15:44 +00:00

In hindsight, `ruff_python` is too general. A good giveaway is that it's actually a prefix of some other crates. The intent of this crate is to reimplement pieces of the Python standard library and CPython itself, so `ruff_python_stdlib` feels appropriate.
10 lines
551 B
Rust
10 lines
551 B
Rust
/// See: <https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals>
|
|
pub const TRIPLE_QUOTE_PREFIXES: &[&str] = &[
|
|
"br'''", "rb'''", "bR'''", "Rb'''", "Br'''", "rB'''", "RB'''", "BR'''", "b'''", "br\"\"\"",
|
|
"rb\"\"\"", "bR\"\"\"", "Rb\"\"\"", "Br\"\"\"", "rB\"\"\"", "RB\"\"\"", "BR\"\"\"", "b\"\"\"",
|
|
"B\"\"\"",
|
|
];
|
|
pub const SINGLE_QUOTE_PREFIXES: &[&str] = &[
|
|
"br'", "rb'", "bR'", "Rb'", "Br'", "rB'", "RB'", "BR'", "b'", "br\"", "rb\"", "bR\"", "Rb\"",
|
|
"Br\"", "rB\"", "RB\"", "BR\"", "b\"", "B\"",
|
|
];
|