feat(vue): switch to new parser (#6233)

* feat(vue): switch to new parser

---------

Co-authored-by: Phạm Huy Hoàng <hoangtun0810@gmail.com>
This commit is contained in:
Christian Clason 2024-03-02 16:54:16 +01:00 committed by GitHub
parent a47540fd73
commit ada920f2a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 28 additions and 9 deletions

View file

@ -759,7 +759,7 @@
"revision": "016ad75faa854e4e13bc40c517015183b795eed9" "revision": "016ad75faa854e4e13bc40c517015183b795eed9"
}, },
"vue": { "vue": {
"revision": "7e48557b903a9db9c38cea3b7839ef7e1f36c693" "revision": "085e99bcc46b2e63ff06a830a31a55132ce95aa5"
}, },
"wgsl": { "wgsl": {
"revision": "40259f3c77ea856841a4e0c4c807705f3e4a2b65" "revision": "40259f3c77ea856841a4e0c4c807705f3e4a2b65"

View file

@ -2204,8 +2204,9 @@ list.vue = {
install_info = { install_info = {
url = "https://github.com/tree-sitter-grammars/tree-sitter-vue", url = "https://github.com/tree-sitter-grammars/tree-sitter-vue",
files = { "src/parser.c", "src/scanner.c" }, files = { "src/parser.c", "src/scanner.c" },
branch = "main",
}, },
maintainers = { "@WhyNotHugo" }, maintainers = { "@WhyNotHugo", "@lucario387" },
} }
list.wgsl = { list.wgsl = {

View file

@ -1,17 +1,38 @@
; inherits: html_tags ; inherits: html_tags
[ [
(directive_dynamic_argument) "["
(directive_dynamic_argument_value) "]"
] @tag ] @punctuation.bracket
(interpolation) @punctuation.special (interpolation) @punctuation.special
(interpolation (interpolation
(raw_text) @none) (raw_text) @none)
(dynamic_directive_inner_value) @variable
(directive_name) @tag.attribute (directive_name) @tag.attribute
; Accessing a component object's field
(":"
.
(directive_value) @variable.member)
("."
.
(directive_value) @property)
; @click is like onclick for HTML
("@"
.
(directive_value) @function.method)
; Used in v-slot, declaring position the element should be put in
("#"
.
(directive_value) @variable)
(directive_attribute (directive_attribute
(quoted_attribute_value) @punctuation.special) (quoted_attribute_value) @punctuation.special)
@ -19,7 +40,4 @@
(quoted_attribute_value (quoted_attribute_value
(attribute_value) @none)) (attribute_value) @none))
[ (directive_modifier) @function.method
(directive_modifier)
(directive_argument)
] @function.method