diff options
Diffstat (limited to 'crates/ra_ide/src/syntax_highlighting')
-rw-r--r-- | crates/ra_ide/src/syntax_highlighting/html.rs | 1 | ||||
-rw-r--r-- | crates/ra_ide/src/syntax_highlighting/tags.rs | 2 | ||||
-rw-r--r-- | crates/ra_ide/src/syntax_highlighting/tests.rs | 4 |
3 files changed, 7 insertions, 0 deletions
diff --git a/crates/ra_ide/src/syntax_highlighting/html.rs b/crates/ra_ide/src/syntax_highlighting/html.rs index 853b4a20f..99b6b25ab 100644 --- a/crates/ra_ide/src/syntax_highlighting/html.rs +++ b/crates/ra_ide/src/syntax_highlighting/html.rs | |||
@@ -85,6 +85,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd | |||
85 | .format_specifier { color: #CC696B; } | 85 | .format_specifier { color: #CC696B; } |
86 | .mutable { text-decoration: underline; } | 86 | .mutable { text-decoration: underline; } |
87 | .unresolved_reference { color: #FC5555; } | 87 | .unresolved_reference { color: #FC5555; } |
88 | .escape_sequence { color: #94BFF3; } | ||
88 | 89 | ||
89 | .keyword { color: #F0DFAF; font-weight: bold; } | 90 | .keyword { color: #F0DFAF; font-weight: bold; } |
90 | .keyword.unsafe { color: #BC8383; font-weight: bold; } | 91 | .keyword.unsafe { color: #BC8383; font-weight: bold; } |
diff --git a/crates/ra_ide/src/syntax_highlighting/tags.rs b/crates/ra_ide/src/syntax_highlighting/tags.rs index f593ecad8..93bbb4b4d 100644 --- a/crates/ra_ide/src/syntax_highlighting/tags.rs +++ b/crates/ra_ide/src/syntax_highlighting/tags.rs | |||
@@ -23,6 +23,7 @@ pub enum HighlightTag { | |||
23 | Constant, | 23 | Constant, |
24 | Enum, | 24 | Enum, |
25 | EnumVariant, | 25 | EnumVariant, |
26 | EscapeSequence, | ||
26 | Field, | 27 | Field, |
27 | FormatSpecifier, | 28 | FormatSpecifier, |
28 | Function, | 29 | Function, |
@@ -72,6 +73,7 @@ impl HighlightTag { | |||
72 | HighlightTag::Constant => "constant", | 73 | HighlightTag::Constant => "constant", |
73 | HighlightTag::Enum => "enum", | 74 | HighlightTag::Enum => "enum", |
74 | HighlightTag::EnumVariant => "enum_variant", | 75 | HighlightTag::EnumVariant => "enum_variant", |
76 | HighlightTag::EscapeSequence => "escape_sequence", | ||
75 | HighlightTag::Field => "field", | 77 | HighlightTag::Field => "field", |
76 | HighlightTag::FormatSpecifier => "format_specifier", | 78 | HighlightTag::FormatSpecifier => "format_specifier", |
77 | HighlightTag::Function => "function", | 79 | HighlightTag::Function => "function", |
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 | }"# |