diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-06-17 16:08:17 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-06-17 16:08:17 +0100 |
commit | f061b2daeb8639b5d24db8d73fa1e21d18196aa4 (patch) | |
tree | 2b1931cadd7400a09e6d10f0cb9ae4cc6646e93d /crates/ra_ide/src/syntax_highlighting/tests.rs | |
parent | 931f3173992df6ac6b728fa9fa9a94d15781027e (diff) | |
parent | 2145e2d878fb3b8ffcaa4ab0858cab3a7a4324e0 (diff) |
Merge #4925
4925: Syntax highlighting for escape sequences in strings r=matklad a=ltentrup
I have added a new semantic token type `ESCAPE_SEQUENCE` as the LSP specification does not seem to have an appropriate token type. This may actually be a regression for some users, as the TextMate Rust grammar has a scope `constant.character.escape.rust` which highlights escape sequences (which caused problems with semantic highlighting, see #4138).
Fixes #2604.
Co-authored-by: Leander Tentrup <[email protected]>
Diffstat (limited to 'crates/ra_ide/src/syntax_highlighting/tests.rs')
-rw-r--r-- | crates/ra_ide/src/syntax_highlighting/tests.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_ide/src/syntax_highlighting/tests.rs b/crates/ra_ide/src/syntax_highlighting/tests.rs index ebf5b50ac..b4d56a7a0 100644 --- a/crates/ra_ide/src/syntax_highlighting/tests.rs +++ b/crates/ra_ide/src/syntax_highlighting/tests.rs | |||
@@ -246,6 +246,10 @@ fn main() { | |||
246 | 246 | ||
247 | println!(r"Hello, {}!", "world"); | 247 | println!(r"Hello, {}!", "world"); |
248 | 248 | ||
249 | // escape sequences | ||
250 | println!("Hello\nWorld"); | ||
251 | println!("\u{48}\x65\x6C\x6C\x6F World"); | ||
252 | |||
249 | println!("{\x41}", A = 92); | 253 | println!("{\x41}", A = 92); |
250 | println!("{ничоси}", ничоси = 92); | 254 | println!("{ничоси}", ничоси = 92); |
251 | }"# | 255 | }"# |