Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'runtime/queries/swift/highlights.scm')
| -rw-r--r-- | runtime/queries/swift/highlights.scm | 83 |
1 files changed, 41 insertions, 42 deletions
diff --git a/runtime/queries/swift/highlights.scm b/runtime/queries/swift/highlights.scm index df05a643..ecafde40 100644 --- a/runtime/queries/swift/highlights.scm +++ b/runtime/queries/swift/highlights.scm @@ -6,7 +6,48 @@ ["." ";" ":" "," ] @punctuation.delimiter ["(" ")" "[" "]" "{" "}" "<" ">"] @punctuation.bracket +; Operators +[ + "!" + "?" + "+" + "-" + "\\" + "*" + "/" + "%" + "=" + "+=" + "-=" + "*=" + "/=" + "<" + ">" + "<=" + ">=" + "++" + "--" + "&" + "~" + "%=" + "!=" + "!==" + "==" + "===" + "??" + + "->" + + "..<" + "..." + (custom_operator) +] @operator + +"?" @type +(type_annotation "!" @type) + ; Identifiers +(simple_identifier) @variable (attribute) @variable (type_identifier) @type (self_expression) @variable.builtin @@ -153,48 +194,6 @@ (boolean_literal) @constant.builtin.boolean "nil" @constant.builtin -"?" @type -(type_annotation "!" @type) - -(simple_identifier) @variable - -; Operators -[ - "!" - "?" - "+" - "-" - "\\" - "*" - "/" - "%" - "=" - "+=" - "-=" - "*=" - "/=" - "<" - ">" - "<=" - ">=" - "++" - "--" - "&" - "~" - "%=" - "!=" - "!==" - "==" - "===" - "??" - - "->" - - "..<" - "..." - (custom_operator) -] @operator - (value_parameter_pack ["each" @keyword]) (value_pack_expansion ["repeat" @keyword]) (type_parameter_pack ["each" @keyword]) |