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 | |
| parent | Update lockfile.json (diff) | |
| download | nvim-treesitter-c95496d8d68363cfb57630bcc767fbc71033f66e.tar nvim-treesitter-c95496d8d68363cfb57630bcc767fbc71033f66e.tar.gz nvim-treesitter-c95496d8d68363cfb57630bcc767fbc71033f66e.tar.bz2 nvim-treesitter-c95496d8d68363cfb57630bcc767fbc71033f66e.tar.lz nvim-treesitter-c95496d8d68363cfb57630bcc767fbc71033f66e.tar.xz nvim-treesitter-c95496d8d68363cfb57630bcc767fbc71033f66e.tar.zst nvim-treesitter-c95496d8d68363cfb57630bcc767fbc71033f66e.zip | |
feat(swift): update parser and queries to 0.3.0 (#3035)
also port upstream query changes
| -rw-r--r-- | lockfile.json | 2 | ||||
| -rw-r--r-- | queries/swift/highlights.scm | 16 |
2 files changed, 12 insertions, 6 deletions
diff --git a/lockfile.json b/lockfile.json index 97bd757ff..47aa4ee44 100644 --- a/lockfile.json +++ b/lockfile.json @@ -297,7 +297,7 @@ "revision": "cfa3f0ac82cd680b4efaa090a0f78035ad43a7c6" }, "swift": { - "revision": "9607603b9bd7a174b06567367ae3949c7a19f011" + "revision": "706bb2147bd7409bab2989466aff566fa0baf3c8" }, "teal": { "revision": "fcc5f6f4d194dede4e676834ff28a506e39e17b4" diff --git a/queries/swift/highlights.scm b/queries/swift/highlights.scm index 95f38f9ef..3d04dcdd3 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]) |
