mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 03:26:52 -04:00
highlights(c_sharp): Add preprocessor directives queries
This commit is contained in:
parent
fde9521f9e
commit
dad4903048
1 changed files with 33 additions and 0 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue