fixup(luau): align @string.regex to the injections (#5829)

This commit is contained in:
Riley Bruins 2023-12-23 21:00:32 -08:00 committed by GitHub
parent cd4de5f7b1
commit 374966b25c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -251,24 +251,12 @@
(function_call
(dot_index_expression
field: (identifier) @_method
(#any-of? @_method "find" "format" "match"))
arguments: (arguments (_) . (string content: _ @string.regex)))
(function_call
(dot_index_expression
field: (identifier) @_method
(#any-of? @_method "gmatch" "gsub"))
arguments: (arguments (_) (string content: _ @string.regex)))
(#any-of? @_method "find" "format" "match" "gmatch" "gsub"))
arguments: (arguments . (_) . (string content: _ @string.regex)))
; ("123"):match("%d+")
(function_call
(method_index_expression
method: (identifier) @_method
(#any-of? @_method "find" "format" "match"))
(#any-of? @_method "find" "format" "match" "gmatch" "gsub"))
arguments: (arguments . (string content: _ @string.regex)))
(function_call
(method_index_expression
method: (identifier) @_method
(#any-of? @_method "gmatch" "gsub"))
arguments: (arguments (string content: _ @string.regex)))