Debian Codegraph @

runtime/queries/heex/injections.scm

raw symbols SCIP
1 ; https://github.com/connorlay/tree-sitter-heex/blob/592e22292a367312c35e13de7fdb888f029981d6/queries/injections.scm
2 ; directives are standalone tags like '<%= @x %>'
3 ;
4 ; partial_expression_values are elixir code that is part of an expression that
5 ; spans multiple directive nodes, so they must be combined. For example:
6 ; <%= if true do %>
7 ; <p>hello, tree-sitter!</p>
8 ; <% end %>
9 ((directive
10 [
11 (partial_expression_value)
12 (ending_expression_value)
13 ] @injection.content)
14 (#set! injection.language "elixir")
15 (#set! injection.include-children)
16 (#set! injection.combined))
17
18 ; Regular expression_values do not need to be combined
19 ((directive (expression_value) @injection.content)
20 (#set! injection.language "elixir"))
21
22 ; expressions live within HTML tags, and do not need to be combined
23 ; <link href={ Routes.static_path(..) } />
24 ((expression (expression_value) @injection.content)
25 (#set! injection.language "elixir"))
26
27 ((comment) @injection.content
28 (#set! injection.language "comment"))