summaryrefslogtreecommitdiff
path: root/queries/teal/injections.scm
blob: f37f4d7474a91edcda97dd82282bea0430746a40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
(
  (function_call
    (index
      (identifier) @_cdef_identifier)
    (arguments
      (string) @c)
  )

  (#eq? @_cdef_identifier "cdef")
  (#lua-match? @c "^[\"']")
  (#offset! @c 0 1 0 -1)
)

(
  (function_call
    (index
      (identifier) @_cdef_identifier)
    (arguments
      (string) @c)
  )

  (#eq? @_cdef_identifier "cdef")
  (#lua-match? @c "^%[%[")
  (#offset! @c 0 2 0 -2)
)

(comment) @comment