diff options
author | Christian Clason <c.clason@uni-graz.at> | 2023-05-13 12:56:21 +0200 |
---|---|---|
committer | Christian Clason <c.clason@uni-graz.at> | 2023-05-15 14:13:42 +0200 |
commit | 9ff59517cbf309d31f979a49b7dc82b237ecfcc4 (patch) | |
tree | 68ce6e9f0b5cfe37b338a549fd2989ac08fdf37c /runtime/queries/c/highlights.scm | |
parent | c97de026e357dec0bed034af3b54abf10966200b (diff) | |
download | rneovim-9ff59517cbf309d31f979a49b7dc82b237ecfcc4.tar.gz rneovim-9ff59517cbf309d31f979a49b7dc82b237ecfcc4.tar.bz2 rneovim-9ff59517cbf309d31f979a49b7dc82b237ecfcc4.zip |
fix(treesitter): update c queries
Diffstat (limited to 'runtime/queries/c/highlights.scm')
-rw-r--r-- | runtime/queries/c/highlights.scm | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/runtime/queries/c/highlights.scm b/runtime/queries/c/highlights.scm index dee70f9cc7..523a792403 100644 --- a/runtime/queries/c/highlights.scm +++ b/runtime/queries/c/highlights.scm @@ -117,12 +117,19 @@ (preproc_defined) ] @function.macro -(field_identifier) @property +(((field_expression + (field_identifier) @property)) @_parent + (#not-has-parent? @_parent template_method function_declarator call_expression)) + +(field_designator) @property +(((field_identifier) @property) + (#has-ancestor? @property field_declaration) + (#not-has-ancestor? @property function_declarator)) + (statement_identifier) @label [ (type_identifier) - (sized_type_specifier) (type_descriptor) ] @type @@ -138,6 +145,8 @@ (primitive_type) @type.builtin +(sized_type_specifier _ @type.builtin type: _?) + ((identifier) @constant (#lua-match? @constant "^[A-Z][A-Z0-9_]+$")) (enumerator @@ -163,6 +172,10 @@ field: (field_identifier) @function.call)) (function_declarator declarator: (identifier) @function) +(function_declarator + declarator: (parenthesized_declarator + (pointer_declarator + declarator: (field_identifier) @function))) (preproc_function_def name: (identifier) @function.macro) |