1 parent
afadd4bca4
commit
ff83f08243
1 file changed
+21
-29
@@ -1,34 +1,26 @@
|
||||
((comment) @injection.content
|
||||
(#set! injection.language "comment")
|
||||
)
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
; SQL -----------------------------------------------------------------------------
|
||||
(
|
||||
([
|
||||
; function calls
|
||||
(call
|
||||
[
|
||||
; function calls
|
||||
(call
|
||||
[
|
||||
(attribute attribute: (identifier) @function_name)
|
||||
(identifier) @function_name
|
||||
]
|
||||
arguments: (argument_list
|
||||
(comment) @comment
|
||||
(string
|
||||
(string_content) @injection.content
|
||||
)
|
||||
))
|
||||
|
||||
; string variables
|
||||
((comment) @comment
|
||||
.
|
||||
(expression_statement
|
||||
(assignment
|
||||
right: (string
|
||||
(string_content) @injection.content
|
||||
)
|
||||
)
|
||||
))
|
||||
(attribute
|
||||
attribute: (identifier))
|
||||
(identifier)
|
||||
]
|
||||
(#match? @comment "^(#|#\\s+)(?i:sql)\\s*$")
|
||||
(#set! injection.language "sql")
|
||||
)
|
||||
arguments: (argument_list
|
||||
(comment) @_comment
|
||||
(string
|
||||
(string_content) @injection.content)))
|
||||
; string variables
|
||||
((comment) @_comment
|
||||
.
|
||||
(expression_statement
|
||||
(assignment
|
||||
right: (string
|
||||
(string_content) @injection.content))))
|
||||
]
|
||||
(#match? @_comment "^(#|#\\s+)(?i:sql)\\s*$")
|
||||
(#set! injection.language "sql"))
|
||||
Reference in new issue
Block a user