aboutsummaryrefslogtreecommitdiffstats
path: root/queries/luau
diff options
context:
space:
mode:
authorRiley Bruins <ribru17@hotmail.com>2023-12-23 21:00:32 -0800
committerGitHub <noreply@github.com>2023-12-24 14:00:32 +0900
commit374966b25c9bcbe29944267128cb78bf857e189a (patch)
treeea581f657b556a3be2c19da12cf969a98fbbdd7a /queries/luau
parentfix: cleanup luap injection queries (diff)
downloadnvim-treesitter-374966b25c9bcbe29944267128cb78bf857e189a.tar
nvim-treesitter-374966b25c9bcbe29944267128cb78bf857e189a.tar.gz
nvim-treesitter-374966b25c9bcbe29944267128cb78bf857e189a.tar.bz2
nvim-treesitter-374966b25c9bcbe29944267128cb78bf857e189a.tar.lz
nvim-treesitter-374966b25c9bcbe29944267128cb78bf857e189a.tar.xz
nvim-treesitter-374966b25c9bcbe29944267128cb78bf857e189a.tar.zst
nvim-treesitter-374966b25c9bcbe29944267128cb78bf857e189a.zip
fixup(luau): align `@string.regex` to the injections (#5829)
Diffstat (limited to 'queries/luau')
-rw-r--r--queries/luau/highlights.scm18
1 files changed, 3 insertions, 15 deletions
diff --git a/queries/luau/highlights.scm b/queries/luau/highlights.scm
index a175276a7..4cd0b443c 100644
--- a/queries/luau/highlights.scm
+++ b/queries/luau/highlights.scm
@@ -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)))