aboutsummaryrefslogtreecommitdiffstats
path: root/queries
diff options
context:
space:
mode:
authorDragonBillow <42114817+cathaysia@users.noreply.github.com>2024-07-03 18:00:51 +0800
committerGitHub <noreply@github.com>2024-07-03 12:00:51 +0200
commitfe5c581ed526f9fd21f8957f4e2c7561ef642d17 (patch)
tree402ad61d9f6192e59d222b30d5fd5356ac16ce12 /queries
parentfix(turtle): update parser and queries (diff)
downloadnvim-treesitter-fe5c581ed526f9fd21f8957f4e2c7561ef642d17.tar
nvim-treesitter-fe5c581ed526f9fd21f8957f4e2c7561ef642d17.tar.gz
nvim-treesitter-fe5c581ed526f9fd21f8957f4e2c7561ef642d17.tar.bz2
nvim-treesitter-fe5c581ed526f9fd21f8957f4e2c7561ef642d17.tar.lz
nvim-treesitter-fe5c581ed526f9fd21f8957f4e2c7561ef642d17.tar.xz
nvim-treesitter-fe5c581ed526f9fd21f8957f4e2c7561ef642d17.tar.zst
nvim-treesitter-fe5c581ed526f9fd21f8957f4e2c7561ef642d17.zip
feat(idl): update idl parser and queries (#6854)
Diffstat (limited to 'queries')
-rw-r--r--queries/idl/highlights.scm67
-rw-r--r--queries/idl/indents.scm5
2 files changed, 68 insertions, 4 deletions
diff --git a/queries/idl/highlights.scm b/queries/idl/highlights.scm
index 47ce31b7b..051690836 100644
--- a/queries/idl/highlights.scm
+++ b/queries/idl/highlights.scm
@@ -50,6 +50,27 @@
] @keyword.modifier
[
+ "SEQUENTIAL"
+ "HASH"
+ "FINAL"
+ "APPENDABLE"
+ "MUTABLE"
+ "c"
+ "c++"
+ "java"
+ "idl"
+ "*"
+ "BEGIN_FILE"
+ "BEFORE_DECLARATION"
+ "BEGIN_DECLARATION"
+ "END_DECLARATION"
+ "AFTER_DECLARATION"
+ "END_FILE"
+ "CORBA"
+ "DDS"
+] @constant
+
+[
"switch"
"case"
"default"
@@ -132,11 +153,43 @@
(annotation_appl
"@" @attribute)
-(annotation_appl
+(annotation_appl_custom_body
(scoped_name) @attribute)
-(annotation_appl
- (annotation_built_name) @attribute.builtin)
+(annotation_appl_builtin_body
+ (_
+ [
+ "id"
+ "autoid"
+ "optional"
+ "position"
+ "value"
+ "extensibility"
+ "final"
+ "appendable"
+ "mutable"
+ "key"
+ "must_understand"
+ "default_literal"
+ "default"
+ "range"
+ "min"
+ "max"
+ "unit"
+ "bit_bound"
+ "external"
+ "nested"
+ "verbatim"
+ "service"
+ "oneway"
+ "ami"
+ ] @attribute.builtin))
+
+(min_expr
+ "min" @attribute.builtin)
+
+(max_expr
+ "max" @attribute.builtin)
(op_dcl
(identifier) @function.method)
@@ -339,3 +392,11 @@
(element_spec
(declarator) @variable.member)
+
+(preproc_include
+ (keyword_include) @type
+ path: (_) @string)
+
+(system_lib_string
+ "<" @string
+ ">" @string)
diff --git a/queries/idl/indents.scm b/queries/idl/indents.scm
index 5c75c52b5..2256fb701 100644
--- a/queries/idl/indents.scm
+++ b/queries/idl/indents.scm
@@ -4,4 +4,7 @@
(definition) @indent.begin
-(predefine) @indent.ignore
+[
+ (preproc_define)
+ (preproc_include)
+] @indent.ignore