@@ -0,0 +1,231 @@
3+; Highlighting queries for D code for use by Tree-Sitter.
5+; Copyright 2022 Garrett D'Amore
7+; Distributed under the MIT License.
8+; (See accompanying file LICENSE.txt or https://opensource.org/licenses/MIT)
9+; SPDX-License-Identifier: MIT
11+; these are listed first, because they override keyword queries
12+(identity_expression (in) @operator)
13+(identity_expression (is) @operator)
15+(storage_class) @keyword.storage
17+(function_declaration (identifier) @function)
19+(call_expression (identifier) @function)
20+(call_expression (type (identifier) @function))
22+(module_fqn) @namespace
86+] @keyword.storage.type
103+(return) @keyword.control.return
105+(import) @keyword.control.import
112+] @keyword.control.repeat
168+] @punctuation.bracket
175+] @punctuation.delimiter
180+] @constant.builtin.boolean
182+(null) @constant.builtin
184+(special_keyword) @constant.builtin
186+(directive) @keyword.directive
187+(shebang) @keyword.directive
218+] @warning ; these types are deprecated
220+(label (identifier) @label)
221+(goto_statement (goto) @keyword (identifier) @label)
223+(string_literal) @string
224+(int_literal) @constant.numeric.integer
225+(float_literal) @constant.numeric.float
226+(char_literal) @constant.character
227+(identifier) @variable
228+(at_attribute) @attribute
230+; everything after __EOF_ is plain text