Debian Codegraph @

runtime/queries/lua/injections.scm

raw symbols SCIP
1 ((comment) @injection.content
2 (#set! injection.language "comment")
3 (#set! injection.include-children))
4
5 ; string.match("123", "%d+")
6 (function_call
7 (dot_index_expression
8 field: (identifier) @_method
9 (#any-of? @_method "find" "match" "gmatch" "gsub"))
10 arguments: (arguments
11 .
12 (_)
13 .
14 (string
15 content: (string_content) @injection.content
16 (#set! injection.language "luap")
17 (#set! injection.include-children))))
18
19 ; ("123"):match("%d+")
20 (function_call
21 (method_index_expression
22 method: (identifier) @_method
23 (#any-of? @_method "find" "match" "gmatch" "gsub"))
24 arguments: (arguments
25 .
26 (string
27 content: (string_content) @injection.content
28 (#set! injection.language "luap")
29 (#set! injection.include-children))))
30
31 ; string.format("format string", ...)
32 ((function_call
33 name: (dot_index_expression
34 table: (identifier) @_table
35 field: (identifier) @_function)
36 arguments: (arguments
37 .
38 (string
39 content: (string_content) @injection.content)))
40 (#eq? @_table "string")
41 (#eq? @_function "format")
42 (#set! injection.language "lua-format-string"))
43
44 ; ("format"):format(...)
45 ((function_call
46 name: (method_index_expression
47 table: (parenthesized_expression
48 (string
49 content: (string_content) @injection.content))
50 method: (identifier) @_function))
51 (#eq? @_function "format")
52 (#set! injection.language "lua-format-string"))