Updated Swift grammar, adding 'any' and 'await' keywords. (#9586)

pull/9415/head
7ombie 10 months ago committed by GitHub
parent 13b9885084
commit 204c3707b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1730,7 +1730,7 @@ language-servers = [ "sourcekit-lsp" ]
[[grammar]] [[grammar]]
name = "swift" name = "swift"
source = { git = "https://github.com/alex-pinkus/tree-sitter-swift", rev = "77c6312c8438f4dbaa0350cec92b3d6dd3d74a66" } source = { git = "https://github.com/alex-pinkus/tree-sitter-swift", rev = "b1b66955d420d5cf5ff268ae552f0d6e43ff66e1" }
[[language]] [[language]]
name = "erb" name = "erb"

@ -1,10 +1,10 @@
; Upstream: https://github.com/alex-pinkus/tree-sitter-swift/blob/8d2fd80e3322df51e3f70952e60d57f5d4077eb8/queries/highlights.scm ; Upstream: https://github.com/alex-pinkus/tree-sitter-swift/blob/1c586339fb00014b23d6933f2cc32b588a226f3b/queries/highlights.scm
(line_string_literal (line_string_literal
["\\(" ")"] @punctuation.special) ["\\(" ")"] @punctuation.special)
["." ";" ":" "," ] @punctuation.delimiter ["." ";" ":" "," ] @punctuation.delimiter
["(" ")" "[" "]" "{" "}"] @punctuation.bracket ; TODO: "\\(" ")" in interpolations should be @punctuation.special ["(" ")" "[" "]" "{" "}"] @punctuation.bracket
; Identifiers ; Identifiers
(attribute) @variable (attribute) @variable
@ -26,6 +26,7 @@
(function_declaration "init" @constructor) (function_declaration "init" @constructor)
(throws) @keyword (throws) @keyword
"async" @keyword "async" @keyword
"await" @keyword
(where_keyword) @keyword (where_keyword) @keyword
(parameter external_name: (simple_identifier) @variable.parameter) (parameter external_name: (simple_identifier) @variable.parameter)
(parameter name: (simple_identifier) @variable.parameter) (parameter name: (simple_identifier) @variable.parameter)
@ -48,6 +49,7 @@
"convenience" "convenience"
"required" "required"
"some" "some"
"any"
] @keyword ] @keyword
[ [

Loading…
Cancel
Save