2022-11-13 23:50:23 +08:00
|
|
|
(((comment) @_jsdoc_comment
|
|
|
|
(#match? @_jsdoc_comment "^/\\*\\*[^\\*].*\\*/")) @jsdoc)
|
|
|
|
|
2022-04-14 12:01:23 +08:00
|
|
|
(comment) @comment
|
|
|
|
|
|
|
|
(call_expression
|
|
|
|
function: ((identifier) @language)
|
|
|
|
arguments: ((template_string) @content
|
|
|
|
(#offset! @content 0 1 0 -1)))
|
|
|
|
|
|
|
|
(call_expression
|
|
|
|
function: ((identifier) @_name
|
|
|
|
(#eq? @_name "gql"))
|
|
|
|
arguments: ((template_string) @graphql
|
|
|
|
(#offset! @graphql 0 1 0 -1)))
|
|
|
|
|
|
|
|
(call_expression
|
|
|
|
function: ((identifier) @_name
|
|
|
|
(#eq? @_name "hbs"))
|
|
|
|
arguments: ((template_string) @glimmer
|
|
|
|
(#offset! @glimmer 0 1 0 -1)))
|
|
|
|
|
2022-11-13 23:50:23 +08:00
|
|
|
((glimmer_template) @glimmer)
|
|
|
|
|
2022-04-14 12:01:23 +08:00
|
|
|
; styled.div`<css>`
|
|
|
|
(call_expression
|
|
|
|
function: (member_expression
|
|
|
|
object: (identifier) @_name
|
|
|
|
(#eq? @_name "styled"))
|
|
|
|
arguments: ((template_string) @css
|
|
|
|
(#offset! @css 0 1 0 -1)))
|
|
|
|
|
|
|
|
; styled(Component)`<css>`
|
|
|
|
(call_expression
|
|
|
|
function: (call_expression
|
|
|
|
function: (identifier) @_name
|
|
|
|
(#eq? @_name "styled"))
|
|
|
|
arguments: ((template_string) @css
|
|
|
|
(#offset! @css 0 1 0 -1)))
|
|
|
|
|
|
|
|
; styled.div.attrs({ prop: "foo" })`<css>`
|
|
|
|
(call_expression
|
|
|
|
function: (call_expression
|
|
|
|
function: (member_expression
|
|
|
|
object: (member_expression
|
|
|
|
object: (identifier) @_name
|
|
|
|
(#eq? @_name "styled"))))
|
|
|
|
arguments: ((template_string) @css
|
|
|
|
(#offset! @css 0 1 0 -1)))
|
|
|
|
|
|
|
|
|
|
|
|
; styled(Component).attrs({ prop: "foo" })`<css>`
|
|
|
|
(call_expression
|
|
|
|
function: (call_expression
|
|
|
|
function: (member_expression
|
|
|
|
object: (call_expression
|
|
|
|
function: (identifier) @_name
|
|
|
|
(#eq? @_name "styled"))))
|
|
|
|
arguments: ((template_string) @css
|
|
|
|
(#offset! @css 0 1 0 -1)))
|
|
|
|
|
|
|
|
(regex_pattern) @regex
|
2022-11-13 23:50:23 +08:00
|
|
|
|
|
|
|
((comment) @_gql_comment
|
|
|
|
(#eq? @_gql_comment "/* GraphQL */")
|
|
|
|
(template_string) @graphql)
|
|
|
|
|
|
|
|
(((template_string) @_template_string
|
|
|
|
(#match? @_template_string "^`#graphql")) @graphql)
|