feat: add tree-sitter-styled (#5735)

* Add styled parser

* Add queries

* Update highlights

* Remove unnecessary highlights

* Update injections to use the styled grammar

* Remove requires npm
This commit is contained in:
Mark Skelton 2023-12-19 06:53:00 -06:00 committed by GitHub
parent 79dcd0e24c
commit a0b815497b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 19 additions and 4 deletions

View file

@ -605,6 +605,9 @@
"strace": {
"revision": "d819cdd5dbe455bd3c859193633c8d91c0df7c36"
},
"styled": {
"revision": "e51e673efc860373167680b4bcbf418a11e4ed26"
},
"supercollider": {
"revision": "3b35bd0fded4423c8fb30e9585c7bacbcd0e8095"
},

View file

@ -1779,6 +1779,14 @@ list.strace = {
maintainers = { "@amaanq" },
}
list.styled = {
install_info = {
url = "https://github.com/mskelton/tree-sitter-styled",
files = { "src/parser.c", "src/scanner.c" },
},
maintainers = { "@mskelton" },
}
list.supercollider = {
install_info = {
url = "https://github.com/madskjeldgaard/tree-sitter-supercollider",

View file

@ -53,7 +53,7 @@
(#eq? @_name "styled"))
arguments: ((template_string) @injection.content
(#offset! @injection.content 0 1 0 -1)
(#set! injection.language "css")))
(#set! injection.language "styled")))
; styled(Component)`<css>`
(call_expression
@ -62,7 +62,7 @@
(#eq? @_name "styled"))
arguments: ((template_string) @injection.content
(#offset! @injection.content 0 1 0 -1)
(#set! injection.language "css")))
(#set! injection.language "styled")))
; styled.div.attrs({ prop: "foo" })`<css>`
(call_expression
@ -73,7 +73,7 @@
(#eq? @_name "styled"))))
arguments: ((template_string) @injection.content
(#offset! @injection.content 0 1 0 -1)
(#set! injection.language "css")))
(#set! injection.language "styled")))
; styled(Component).attrs({ prop: "foo" })`<css>`
@ -85,7 +85,7 @@
(#eq? @_name "styled"))))
arguments: ((template_string) @injection.content
(#offset! @injection.content 0 1 0 -1)
(#set! injection.language "css")))
(#set! injection.language "styled")))
((regex_pattern) @injection.content
(#set! injection.language "regex"))

1
queries/styled/folds.scm Normal file
View file

@ -0,0 +1 @@
; inherits: css

View file

@ -0,0 +1 @@
; inherits: css

View file

@ -0,0 +1 @@
; inherits: css

View file

@ -0,0 +1 @@
; inherits: css