diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2022-06-19 14:18:16 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-19 14:18:16 +0200 |
| commit | c95496d8d68363cfb57630bcc767fbc71033f66e (patch) | |
| tree | b9c6f6569086c059323344b46c94d78a05854b31 /queries/swift | |
| parent | 5c364707442965ae52a1ac89c359080e32958445 (diff) | |
feat(swift): update parser and queries to 0.3.0 (#3035)
also port upstream query changes
Diffstat (limited to 'queries/swift')
| -rw-r--r-- | queries/swift/highlights.scm | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/queries/swift/highlights.scm b/queries/swift/highlights.scm index 95f38f9e..3d04dcdd 100644 --- a/queries/swift/highlights.scm +++ b/queries/swift/highlights.scm @@ -3,7 +3,6 @@ ; Identifiers (attribute) @variable -(simple_identifier) @variable (type_identifier) @type (self_expression) @variable.builtin @@ -21,13 +20,14 @@ (function_declaration (simple_identifier) @method) (function_declaration ["init" @constructor]) (throws) @keyword -(async) @keyword +"async" @keyword (where_keyword) @keyword (parameter external_name: (simple_identifier) @parameter) (parameter name: (simple_identifier) @parameter) (type_parameter (type_identifier) @parameter) (inheritance_constraint (identifier (simple_identifier) @parameter)) (equality_constraint (identifier (simple_identifier) @parameter)) +(pattern bound_identifier: (simple_identifier)) @variable [ "typealias" @@ -37,10 +37,17 @@ "protocol" "extension" "indirect" + "some" ] @keyword -(class_body (property_declaration (value_binding_pattern (non_binding_pattern (simple_identifier) @property)))) -(protocol_property_declaration (value_binding_pattern (non_binding_pattern (simple_identifier) @property))) +[ + (getter_specifier) + (setter_specifier) + (modify_specifier) +] @keyword + +(class_body (property_declaration (pattern (simple_identifier) @property))) +(protocol_property_declaration (pattern (simple_identifier) @property)) (import_declaration ["import" @include]) @@ -68,7 +75,6 @@ ["while" "repeat" "continue" "break"] @repeat ["let" "var"] @keyword -(non_binding_pattern (simple_identifier) @variable) (guard_statement ["guard" @conditional]) (if_statement ["if" @conditional]) |
