From 78fe6133c4908aefcf5c690e665abba9ef2389eb Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Sun, 10 Jan 2021 13:33:03 +0100 Subject: Split punctuation semantic highlighting up into more tags --- .../test_data/highlighting.html | 260 ++++++++++----------- 1 file changed, 130 insertions(+), 130 deletions(-) (limited to 'crates/ide/src/syntax_highlighting/test_data/highlighting.html') diff --git a/crates/ide/src/syntax_highlighting/test_data/highlighting.html b/crates/ide/src/syntax_highlighting/test_data/highlighting.html index 02270b077..b7bec083b 100644 --- a/crates/ide/src/syntax_highlighting/test_data/highlighting.html +++ b/crates/ide/src/syntax_highlighting/test_data/highlighting.html @@ -36,187 +36,187 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd .unresolved_reference { color: #FC5555; text-decoration: wavy underline; } -
use inner::{self as inner_mod};
-mod inner {}
+
use inner::{self as inner_mod};
+mod inner {}
 
 #[rustc_builtin_macro]
-macro Copy {}
+macro Copy {}
 
 // Needed for function consuming vs normal
-pub mod marker {
+pub mod marker {
     #[lang = "copy"]
-    pub trait Copy {}
-}
+    pub trait Copy {}
+}
 
-pub mod ops {
+pub mod ops {
     #[lang = "fn_once"]
-    pub trait FnOnce<Args> {}
+    pub trait FnOnce<Args> {}
 
     #[lang = "fn_mut"]
-    pub trait FnMut<Args>: FnOnce<Args> {}
+    pub trait FnMut<Args>: FnOnce<Args> {}
 
     #[lang = "fn"]
-    pub trait Fn<Args>: FnMut<Args> {}
-}
+    pub trait Fn<Args>: FnMut<Args> {}
+}
 
 
-struct Foo {
-    pub x: i32,
-    pub y: i32,
-}
+struct Foo {
+    pub x: i32,
+    pub y: i32,
+}
 
-trait Bar {
-    fn bar(&self) -> i32;
-}
+trait Bar {
+    fn bar(&self) -> i32;
+}
 
-impl Bar for Foo {
-    fn bar(&self) -> i32 {
+impl Bar for Foo {
+    fn bar(&self) -> i32 {
         self.x
-    }
-}
+    }
+}
 
-impl Foo {
-    fn baz(mut self, f: Foo) -> i32 {
-        f.baz(self)
-    }
+impl Foo {
+    fn baz(mut self, f: Foo) -> i32 {
+        f.baz(self)
+    }
 
-    fn qux(&mut self) {
-        self.x = 0;
-    }
+    fn qux(&mut self) {
+        self.x = 0;
+    }
 
-    fn quop(&self) -> i32 {
+    fn quop(&self) -> i32 {
         self.x
-    }
-}
+    }
+}
 
-#[derive(Copy)]
-struct FooCopy {
-    x: u32,
-}
+#[derive(Copy)]
+struct FooCopy {
+    x: u32,
+}
 
-impl FooCopy {
-    fn baz(self, f: FooCopy) -> u32 {
-        f.baz(self)
-    }
+impl FooCopy {
+    fn baz(self, f: FooCopy) -> u32 {
+        f.baz(self)
+    }
 
-    fn qux(&mut self) {
-        self.x = 0;
-    }
+    fn qux(&mut self) {
+        self.x = 0;
+    }
 
-    fn quop(&self) -> u32 {
+    fn quop(&self) -> u32 {
         self.x
-    }
-}
+    }
+}
 
-static mut STATIC_MUT: i32 = 0;
+static mut STATIC_MUT: i32 = 0;
 
-fn foo<'a, T>() -> T {
-    foo::<'a, i32>()
-}
+fn foo<'a, T>() -> T {
+    foo::<'a, i32>()
+}
 
-fn never() -> ! {
-    loop {}
-}
+fn never() -> ! {
+    loop {}
+}
 
-fn const_param<const FOO: usize>() -> usize {
+fn const_param<const FOO: usize>() -> usize {
     FOO
-}
+}
 
-use ops::Fn;
-fn baz<F: Fn() -> ()>(f: F) {
-    f()
-}
+use ops::Fn;
+fn baz<F: Fn() -> ()>(f: F) {
+    f()
+}
 
-fn foobar() -> impl Copy {}
+fn foobar() -> impl Copy {}
 
-fn foo() {
-    let bar = foobar();
-}
+fn foo() {
+    let bar = foobar();
+}
 
-macro_rules! def_fn {
-    ($($tt:tt)*) => {$($tt)*}
-}
+macro_rules! def_fn {
+    ($($tt:tt)*) => {$($tt)*}
+}
 
-def_fn! {
-    fn bar() -> u32 {
+def_fn! {
+    fn bar() -> u32 {
         100
-    }
-}
+    }
+}
 
-macro_rules! noop {
-    ($expr:expr) => {
+macro_rules! noop {
+    ($expr:expr) => {
         $expr
-    }
-}
+    }
+}
 
-macro_rules! keyword_frag {
-    ($type:ty) => ($type)
-}
+macro_rules! keyword_frag {
+    ($type:ty) => ($type)
+}
 
 // comment
-fn main() {
-    println!("Hello, {}!", 92);
-
-    let mut vec = Vec::new();
-    if true {
-        let x = 92;
-        vec.push(Foo { x, y: 1 });
-    }
-    unsafe {
-        vec.set_len(0);
-        STATIC_MUT = 1;
-    }
-
-    for e in vec {
+fn main() {
+    println!("Hello, {}!", 92);
+
+    let mut vec = Vec::new();
+    if true {
+        let x = 92;
+        vec.push(Foo { x, y: 1 });
+    }
+    unsafe {
+        vec.set_len(0);
+        STATIC_MUT = 1;
+    }
+
+    for e in vec {
         // Do nothing
-    }
+    }
 
-    noop!(noop!(1));
+    noop!(noop!(1));
 
-    let mut x = 42;
-    let y = &mut x;
-    let z = &y;
+    let mut x = 42;
+    let y = &mut x;
+    let z = &y;
 
-    let Foo { x: z, y } = Foo { x: z, y };
+    let Foo { x: z, y } = Foo { x: z, y };
 
-    y;
+    y;
 
-    let mut foo = Foo { x, y: x };
-    let foo2 = Foo { x, y: x };
-    foo.quop();
-    foo.qux();
-    foo.baz(foo2);
+    let mut foo = Foo { x, y: x };
+    let foo2 = Foo { x, y: x };
+    foo.quop();
+    foo.qux();
+    foo.baz(foo2);
 
-    let mut copy = FooCopy { x };
-    copy.quop();
-    copy.qux();
-    copy.baz(copy);
+    let mut copy = FooCopy { x };
+    copy.quop();
+    copy.qux();
+    copy.baz(copy);
 
-    let a = |x| x;
-    let bar = Foo::baz;
+    let a = |x| x;
+    let bar = Foo::baz;
 
-    let baz = -42;
-    let baz = -baz;
+    let baz = -42;
+    let baz = -baz;
 
-    let _ = !true;
+    let _ = !true;
 
-    'foo: loop {
-        break 'foo;
-        continue 'foo;
-    }
-}
+    'foo: loop {
+        break 'foo;
+        continue 'foo;
+    }
+}
 
-enum Option<T> {
-    Some(T),
-    None,
-}
-use Option::*;
+enum Option<T> {
+    Some(T),
+    None,
+}
+use Option::*;
 
-impl<T> Option<T> {
-    fn and<U>(self, other: Option<U>) -> Option<(T, U)> {
-        match other {
-            None => unimplemented!(),
-            Nope => Nope,
-        }
-    }
-}
\ No newline at end of file +impl<T> Option<T> { + fn and<U>(self, other: Option<U>) -> Option<(T, U)> { + match other { + None => unimplemented!(), + Nope => Nope, + } + } +}
\ No newline at end of file -- cgit v1.2.3