Unnamed repository; edit this file 'description' to name the repository.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
; extends

; Support injections for the code macro
(macro
  name: (macro_name) @_macro_name
  params: (macro_params
            (macro_param
              name: (param_name) @_param_name
              value: (param_value
                       (string
                         (string_content) @injection.language))))
  (macro_content) @injection.content
  (#match? @_macro_name "^code$")
  (#match? @_param_name "^language$"))

; Support the HTML macro
(macro
  name: (macro_name) @_macro_name
  (macro_content) @injection.content
  (#match? @_macro_name "^html$")
  (#set! injection.language "html"))

; Support the Python macro
(macro
  name: (macro_name) @_macro_name
  (macro_content) @injection.content
  (#match? @_macro_name "^python$")
  (#set! injection.language "python"))

; Support the Ruby macro
(macro
  name: (macro_name) @_macro_name
  (macro_content) @injection.content
  (#match? @_macro_name "^ruby$")
  (#set! injection.language "ruby"))

; Support the Groovy macro
(macro
  name: (macro_name) @_macro_name
  (macro_content) @injection.content
  (#match? @_macro_name "^groovy$")
  (#set! injection.language "^groovy"))

; Support the Velocity macro
(macro
  name: (macro_name) @_macro_name
  (macro_content) @injection.content
  (#match? @_macro_name "^velocity$")
  (#set! injection.language "^velocity"))

; Support the PHP macro
(macro
  name: (macro_name) @_macro_name
  (macro_content) @injection.content
  (#match? @_macro_name "^php$")
  (#set! injection.language "php"))