From dad49030481de597e82e2ca2ea804e828bf96b05 Mon Sep 17 00:00:00 2001 From: Luxed Date: Thu, 3 Jun 2021 20:54:10 -0400 Subject: highlights(c_sharp): Add preprocessor directives queries --- queries/c_sharp/highlights.scm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/queries/c_sharp/highlights.scm b/queries/c_sharp/highlights.scm index 637e30e00..0bf777f0d 100644 --- a/queries/c_sharp/highlights.scm +++ b/queries/c_sharp/highlights.scm @@ -121,14 +121,47 @@ (for_each_statement type: (identifier) @type) +(warning_directive) @text.warning +(error_directive) @exception + +(define_directive + (identifier) @constant) @constant.macro +(undef_directive + (identifier) @constant) @constant.macro + +(line_directive) @constant.macro +(line_directive + (preproc_integer_literal) @constant + (preproc_string_literal)? @string) + +(pragma_directive + (identifier) @constant) @constant.macro +(pragma_directive + (preproc_string_literal) @string) @constant.macro + +[ + (nullable_directive) + (region_directive) + (endregion_directive) +] @constant.macro + [ "if" "else" "switch" "break" "case" + (if_directive) + (elif_directive) + (else_directive) + (endif_directive) ] @conditional +(if_directive + (identifier) @constant) +(elif_directive + (identifier) @constant) + [ "while" "for" -- cgit v1.2.3-70-g09d2