summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Seitz <stephan.seitz@fau.de>2021-09-21 20:41:17 +0200
committerStephan Seitz <stephan.seitz@fau.de>2021-09-25 00:59:40 +0200
commit351eefd988ae5d8873147cf082014a99be0007f0 (patch)
tree1df9db603fcb9620add43f1587143c7b23661b3f
parent46858cfeea42bc8cb65edb3fe68bd4d249759088 (diff)
injections(teal): fix cdef injection
-rw-r--r--queries/teal/injections.scm15
1 files changed, 15 insertions, 0 deletions
diff --git a/queries/teal/injections.scm b/queries/teal/injections.scm
index c61f7d57..5fceed10 100644
--- a/queries/teal/injections.scm
+++ b/queries/teal/injections.scm
@@ -7,6 +7,21 @@
)
(#eq? @_cdef_identifier "cdef")
+ (#match? @c "^[\"']")
+ (#offset! @c 0 1 0 -1)
+)
+
+(
+ (function_call
+ (index
+ (identifier) @_cdef_identifier)
+ (arguments
+ (string) @c)
+ )
+
+ (#eq? @_cdef_identifier "cdef")
+ (#match? @c "^\\[\\[")
+ (#offset! @c 0 2 0 -2)
)
(comment) @comment