| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
(call_expression |
| 5 |
function: [ |
| 6 |
(identifier) @injection.language |
| 7 |
(member_expression |
| 8 |
property: (property_identifier) @injection.language) |
| 9 |
] |
| 10 |
arguments: (template_string (string_fragment) @injection.content) |
| 11 |
(#any-of? @injection.language "html" "css" "json" "sql" "js" "ts" "bash")) |
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
(call_expression |
| 16 |
function: [ |
| 17 |
(identifier) @_template_function_name |
| 18 |
(member_expression |
| 19 |
property: (property_identifier) @_template_function_name) |
| 20 |
] |
| 21 |
arguments: (template_string (string_fragment) @injection.content) |
| 22 |
(#eq? @_template_function_name "$") |
| 23 |
(#set! injection.language "bash")) |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
( |
| 30 |
(call_expression |
| 31 |
function: (identifier) @_template_function_name |
| 32 |
arguments: [ |
| 33 |
|
| 34 |
(template_string (string_fragment) @injection.content) |
| 35 |
( |
| 36 |
arguments . [ |
| 37 |
|
| 38 |
(string (string_fragment) @injection.content) |
| 39 |
|
| 40 |
(template_string (string_fragment) @injection.content) |
| 41 |
] |
| 42 |
) |
| 43 |
] |
| 44 |
) |
| 45 |
(#any-of? @_template_function_name "gql" "graphql") |
| 46 |
(#set! injection.language "graphql") |
| 47 |
) |
| 48 |
|
| 49 |
|
| 50 |
( |
| 51 |
[ |
| 52 |
(string (string_fragment) @injection.content) |
| 53 |
(template_string (string_fragment) @injection.content) |
| 54 |
] |
| 55 |
(#match? @injection.content "^\\s*#graphql") |
| 56 |
(#set! injection.language "graphql") |
| 57 |
) |
| 58 |
|
| 59 |
|
| 60 |
( |
| 61 |
((comment) @_ecma_comment) . [ |
| 62 |
(string (string_fragment) @injection.content) |
| 63 |
(template_string (string_fragment) @injection.content) |
| 64 |
(call_expression |
| 65 |
arguments: (template_string (string_fragment) @injection.content) |
| 66 |
) |
| 67 |
] |
| 68 |
(#eq? @_ecma_comment "/* GraphQL */") |
| 69 |
(#set! injection.language "graphql") |
| 70 |
) |
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
((regex_pattern) @injection.content |
| 75 |
(#set! injection.language "regex")) |
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
((comment) @injection.content |
| 80 |
(#set! injection.language "jsdoc") |
| 81 |
(#match? @injection.content "^/\\*+")) |
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
((comment) @injection.content |
| 86 |
(#set! injection.language "comment") |
| 87 |
(#match? @injection.content "^//")) |
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
(call_expression |
| 98 |
function: (member_expression |
| 99 |
object: (identifier) @_object |
| 100 |
property: (property_identifier) @_property (#any-of? @_property "querySelector" "querySelectorAll" "closest" "matches")) |
| 101 |
arguments: (arguments |
| 102 |
(string (string_fragment) @injection.content)) |
| 103 |
(#set! injection.language "css")) |
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
(call_expression |
| 108 |
function: (identifier) @_name |
| 109 |
(#any-of? @_name "createGlobalStyle" "keyframes" "injectGlobal") |
| 110 |
arguments: (template_string (string_fragment) @injection.content) |
| 111 |
(#set! injection.language "css")) |
| 112 |
|
| 113 |
|
| 114 |
(call_expression |
| 115 |
function: (member_expression |
| 116 |
object: (identifier) @_styled (#eq? @_styled "styled")) |
| 117 |
arguments: (template_string (string_fragment) @injection.content) |
| 118 |
(#set! injection.language "css")) |
| 119 |
|
| 120 |
|
| 121 |
(call_expression |
| 122 |
function: (call_expression |
| 123 |
function: (identifier) @_styled (#eq? @_styled "styled")) |
| 124 |
arguments: (template_string (string_fragment) @injection.content) |
| 125 |
(#set! injection.language "css")) |