28
28
@ SuppressWarnings ({"ImmutableEnumChecker" , "nls" })
29
29
public enum DiffDriver {
30
30
/**
31
- * Built-in diff driver for <a
32
- * href= "https://learn.microsoft.com/en-us/cpp/cpp/cpp-language-reference">c++</a>
31
+ * Built-in diff driver for <a href=
32
+ * "https://learn.microsoft.com/en-us/cpp/cpp/cpp-language-reference">c++</a>
33
33
*/
34
34
cpp (List .of (
35
35
/* Jump targets or access declarations */
36
36
"^[ \\ t]*[A-Za-z_][A-Za-z_0-9]*:\\ s*($|/[/*])" ), List .of (
37
37
/* functions/methods, variables, and compounds at top level */
38
38
"^((::\\ s*)?[A-Za-z_].*)$" )),
39
39
/**
40
- * Built-in diff driver for <a
41
- * href= "https://devicetree-specification.readthedocs.io/en/stable/source-language.html">device
40
+ * Built-in diff driver for <a href=
41
+ * "https://devicetree-specification.readthedocs.io/en/stable/source-language.html">device
42
42
* tree files</a>
43
43
*/
44
44
dts (List .of (";" , "=" ), List .of (
45
45
/* lines beginning with a word optionally preceded by '&' or the root */
46
46
"^[ \\ t]*((/[ \\ t]*\\ {|&?[a-zA-Z_]).*)" )),
47
47
/**
48
- * Built-in diff driver for <a
49
- * href= "https://docs.oracle.com/javase/specs/jls/se21/html/index.html">java</a>
48
+ * Built-in diff driver for <a href=
49
+ * "https://docs.oracle.com/javase/specs/jls/se21/html/index.html">java</a>
50
50
*/
51
51
java (List .of (
52
52
"^[ \\ t]*(catch|do|for|if|instanceof|new|return|switch|throw|while)" ),
@@ -58,13 +58,13 @@ public enum DiffDriver {
58
58
"^[ \\ t]*(([A-Za-z_<>&\\ ]\\ [][?&<>.,A-Za-z_0-9]*[ \\ t]+)+[A-Za-z_]"
59
59
+ "[A-Za-z_0-9]*[ \\ t]*\\ ([^;]*)$" )),
60
60
/**
61
- * Built-in diff driver for <a
62
- * href="https://docs.python.org/3/reference/index.html">python</a>
61
+ * Built-in diff driver for
62
+ * <a href="https://docs.python.org/3/reference/index.html">python</a>
63
63
*/
64
64
python (List .of ("^[ \\ t]*((class|(async[ \\ t]+)?def)[ \\ t].*)$" )),
65
65
/**
66
- * Built-in diff driver for <a *
67
- * href="https://doc.rust-lang.org/reference/introduction.html">java</a>
66
+ * Built-in diff driver for
67
+ * <a href="https://doc.rust-lang.org/reference/introduction.html">java</a>
68
68
*/
69
69
rust (List .of ("^[\\ t ]*((pub(\\ ([^\\ )]+\\ ))?[\\ t ]+)?"
70
70
+ "((async|const|unsafe|extern([\\ t ]+\" [^\" ]+\" ))[\\ t ]+)?"
0 commit comments