From 40a00fb2249fd9d359eb26a61e2af73950cd8f70 Mon Sep 17 00:00:00 2001 From: krizej <60076189+krizej@users.noreply.github.com> Date: Sat, 14 Sep 2024 22:06:03 +0200 Subject: [PATCH] Add missing operators and keywords to the C syntax highlighting (#17541) Based on https://en.cppreference.com/w/c/language/expressions#Operators Release Notes: - Added missing operators and keywords to the C syntax highlighting --- crates/languages/src/c/highlights.scm | 48 +++++++++++++++++++-------- 1 file changed, 35 insertions(+), 13 deletions(-) diff --git a/crates/languages/src/c/highlights.scm b/crates/languages/src/c/highlights.scm index 0a8c12f06f..634f8d81c4 100644 --- a/crates/languages/src/c/highlights.scm +++ b/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 [