Debian Codegraph @

runtime/queries/luau/injections.scm

raw symbols SCIP
1 ((comment) @injection.content
2 (#set! injection.language "comment"))
3
4 ; string.match("123", "%d+")
5 (call_stmt
6 invoked: (var
7 table_name: (name)
8 (key
9 field_name: (name) @_method))
10 (arglist
11 .
12 (_)
13 .
14 (string) @injection.content)
15 (#any-of? @_method "find" "format" "match" "gmatch" "gsub")
16 (#set! injection.language "luap"))
17
18 ; ("123"):match("%d+")
19 (call_stmt
20 method_table: (_)
21 method_name: (name) @_method
22 (arglist
23 .
24 (string) @injection.content)
25 (#any-of? @_method "find" "format" "match" "gmatch" "gsub")
26 (#set! injection.language "luap"))
27
28 ; string.format("format string", ...)
29 ((call_stmt
30 invoked: (var
31 table_name: (name) @_table
32 (key
33 field_name: (name) @_function))
34 (arglist
35 . (string) @injection.content))
36 (#eq? @_table "string")
37 (#eq? @_function "format")
38 (#set! injection.language "lua-format-string"))
39
40 ; ("format"):format(...)
41 ((call_stmt
42 method_table: (exp_wrap (string) @injection.content)
43 method_name: (name) @_function)
44 (#eq? @_function "format")
45 (#set! injection.language "lua-format-string"))