Add missing operators and keywords to the C syntax highlighting (#17541)

krizej created

Based on https://en.cppreference.com/w/c/language/expressions#Operators

Release Notes:

- Added missing operators and keywords to the C syntax highlighting

Change summary

crates/languages/src/c/highlights.scm | 40 ++++++++++++++++++++++------
1 file changed, 31 insertions(+), 9 deletions(-)

Detailed changes

crates/languages/src/c/highlights.scm 🔗

@@ -9,6 +9,7 @@
   "enum"
   "extern"
   "for"
+  "goto"
   "if"
   "inline"
   "return"
@@ -35,27 +36,48 @@
 ] @keyword
 
 [
+  "="
+  "+="
+  "-="
+  "*="
+  "/="
+  "%="
+  "&="
+  "|="
+  "^="
+  "<<="
+  ">>="
+  "++"
   "--"
+  "+"
   "-"
-  "-="
-  "->"
-  "="
-  "!="
   "*"
+  "/"
+  "%"
+  "~"
   "&"
+  "|"
+  "^"
+  "<<"
+  ">>"
+  "!"
   "&&"
-  "+"
-  "++"
-  "+="
-  "<"
+  "||"
   "=="
+  "!="
+  "<"
   ">"
-  "||"
+  "<="
+  ">="
+  "->"
+  "?"
+  ":"
 ] @operator
 
 [
   "."
   ";"
+  ","
 ] @punctuation.delimiter
 
 [