Merge pull request #321 from natsukagami/use-match

Use match? instead of lua-match? for queries
pull/659/head
Vasil Markoukin 2023-06-30 18:22:10 +07:00 committed by GitHub
commit 263ce720d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 11 deletions

@ -64,18 +64,18 @@
((stable_identifier (identifier) @namespace))
((import_declaration
path: (identifier) @type) (#lua-match? @type "^[A-Z]"))
((stable_identifier (identifier) @type) (#lua-match? @type "^[A-Z]"))
path: (identifier) @type) (#match? @type "^[A-Z]"))
((stable_identifier (identifier) @type) (#match? @type "^[A-Z]"))
(export_declaration
path: (identifier) @namespace)
((stable_identifier (identifier) @namespace))
((export_declaration
path: (identifier) @type) (#lua-match? @type "^[A-Z]"))
((stable_identifier (identifier) @type) (#lua-match? @type "^[A-Z]"))
path: (identifier) @type) (#match? @type "^[A-Z]"))
((stable_identifier (identifier) @type) (#match? @type "^[A-Z]"))
((namespace_selectors (identifier) @type) (#lua-match? @type "^[A-Z]"))
((namespace_selectors (identifier) @type) (#match? @type "^[A-Z]"))
; method invocation
@ -91,7 +91,7 @@
((call_expression
function: (identifier) @constructor)
(#lua-match? @constructor "^[A-Z]"))
(#match? @constructor "^[A-Z]"))
(generic_function
function: (identifier) @function.call)
@ -114,7 +114,7 @@
(field_expression field: (identifier) @property)
(field_expression value: (identifier) @type
(#lua-match? @type "^[A-Z]"))
(#match? @type "^[A-Z]"))
(infix_expression operator: (identifier) @operator)
(infix_expression operator: (operator_identifier) @operator)
@ -245,13 +245,13 @@
(operator_identifier) @operator
((identifier) @type (#lua-match? @type "^[A-Z]"))
((identifier) @type (#match? @type "^[A-Z]"))
((identifier) @variable.builtin
(#lua-match? @variable.builtin "^this$"))
(#match? @variable.builtin "^this$"))
(
(identifier) @function.builtin
(#lua-match? @function.builtin "^super$")
(#match? @function.builtin "^super$")
)
;; Scala CLI using directives

@ -36,8 +36,8 @@ object O2:
// SIP-44
class C:
// ^keyword
// ^type
fooooo.map: x =>
// ^type
// ^method.call
x + 1