Constant tree_sitter_javascript::INJECTIONS_QUERY
source ยท pub const INJECTIONS_QUERY: &str = "; Parse the contents of tagged template literals using\n; a language inferred from the tag.\n\n(call_expression\n function: [\n (identifier) @injection.language\n (member_expression\n property: (property_identifier) @injection.language)\n ]\n arguments: (template_string (string_fragment) @injection.content)\n (#set! injection.combined)\n (#set! injection.include-children))\n\n\n; Parse regex syntax within regex literals\n\n((regex_pattern) @injection.content\n (#set! injection.language \"regex\"))\n\n ; Parse JSDoc annotations in comments\n\n((comment) @injection.content\n (#set! injection.language \"jsdoc\"))\n\n; Parse Ember/Glimmer/Handlebars/HTMLBars/etc. template literals\n; e.g.: await render(hbs`<SomeComponent />`)\n(call_expression\n function: ((identifier) @_name\n (#eq? @_name \"hbs\"))\n arguments: ((template_string) @glimmer\n (#offset! @glimmer 0 1 0 -1)))\n\n; Ember Unified <template> syntax\n; e.g.: <template><SomeComponent @arg={{double @value}} /></template>\n((glimmer_template) @glimmer)\n";
Expand description
The syntax highlighting query for languages injected into this one.