mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 11:06:54 -04:00
feat(typoscript)!: update grammar and queries (#8341)
Breaking change: `(condition_bool)` renamed to `(condition_bool_legacy)`
This commit is contained in:
parent
d3218d988f
commit
568f2a3b7d
5 changed files with 104 additions and 14 deletions
|
|
@ -2422,7 +2422,7 @@ return {
|
||||||
},
|
},
|
||||||
typoscript = {
|
typoscript = {
|
||||||
install_info = {
|
install_info = {
|
||||||
revision = '5d8fde870b0ded1f429ba5bb249a9d9f8589ff5f',
|
revision = 'e59069a4cc08b2dacccd40827fe971ca3c6821b7',
|
||||||
url = 'https://github.com/Teddytrombone/tree-sitter-typoscript',
|
url = 'https://github.com/Teddytrombone/tree-sitter-typoscript',
|
||||||
},
|
},
|
||||||
maintainers = { '@Teddytrombone' },
|
maintainers = { '@Teddytrombone' },
|
||||||
|
|
|
||||||
|
|
@ -1 +1,11 @@
|
||||||
(block) @fold
|
[
|
||||||
|
(block)
|
||||||
|
(condition_block)
|
||||||
|
(multiline_value)
|
||||||
|
] @fold
|
||||||
|
|
||||||
|
(import_legacy)+ @fold
|
||||||
|
|
||||||
|
(import)+ @fold
|
||||||
|
|
||||||
|
(comment)+ @fold
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,28 @@
|
||||||
(identifier) @variable.member
|
(identifier) @variable.member
|
||||||
|
|
||||||
|
(symfony_variable) @variable
|
||||||
|
|
||||||
(constant) @constant
|
(constant) @constant
|
||||||
|
|
||||||
(modifier_function) @function
|
(symfony_method) @function.method.call
|
||||||
|
|
||||||
(modifier_predefined) @function.builtin
|
[
|
||||||
|
(modifier_function)
|
||||||
|
(symfony_function)
|
||||||
|
] @function.call
|
||||||
|
|
||||||
|
[
|
||||||
|
(modifier_predefined)
|
||||||
|
(symfony_predefined_function)
|
||||||
|
] @function.builtin
|
||||||
|
|
||||||
|
(modifier_parameter) @variable.parameter
|
||||||
|
|
||||||
|
(symfony_function_parameter
|
||||||
|
(symfony_variable) @variable.parameter)
|
||||||
|
|
||||||
|
(symfony_method_parameter
|
||||||
|
(symfony_variable) @variable.parameter)
|
||||||
|
|
||||||
[
|
[
|
||||||
(condition)
|
(condition)
|
||||||
|
|
@ -12,13 +30,19 @@
|
||||||
(condition_else)
|
(condition_else)
|
||||||
] @keyword.conditional
|
] @keyword.conditional
|
||||||
|
|
||||||
(cobject) @type.builtin
|
|
||||||
|
|
||||||
[
|
[
|
||||||
"@import"
|
"@import"
|
||||||
"INCLUDE_TYPOSCRIPT"
|
"INCLUDE_TYPOSCRIPT"
|
||||||
] @keyword.import
|
] @keyword.import
|
||||||
|
|
||||||
|
(condition_attribute) @tag.attribute
|
||||||
|
|
||||||
|
(cobject) @type.builtin
|
||||||
|
|
||||||
|
(symfony_built_in_variable) @variable.builtin
|
||||||
|
|
||||||
|
(symfony_property) @variable.member
|
||||||
|
|
||||||
[
|
[
|
||||||
(comment)
|
(comment)
|
||||||
(single_line_comment)
|
(single_line_comment)
|
||||||
|
|
@ -26,22 +50,59 @@
|
||||||
|
|
||||||
[
|
[
|
||||||
(string)
|
(string)
|
||||||
(multiline_value)
|
(multiline_value_content)
|
||||||
|
(symfony_string)
|
||||||
] @string
|
] @string
|
||||||
|
|
||||||
|
(deletion_line
|
||||||
|
">" @operator)
|
||||||
|
|
||||||
|
(copy_line
|
||||||
|
"<" @operator)
|
||||||
|
|
||||||
[
|
[
|
||||||
"="
|
"="
|
||||||
">"
|
|
||||||
"<"
|
|
||||||
":="
|
|
||||||
"=<"
|
"=<"
|
||||||
(condition_bool)
|
":="
|
||||||
|
"?."
|
||||||
|
(symfony_condition_operator)
|
||||||
|
(condition_bool_legacy)
|
||||||
|
(constant_null_coalescing)
|
||||||
] @operator
|
] @operator
|
||||||
|
|
||||||
"," @punctuation.delimiter
|
(symfony_ternary_operator) @keyword.conditional.ternary
|
||||||
|
|
||||||
|
((symfony_condition_operator) @keyword.operator
|
||||||
|
(#any-of? @keyword.operator
|
||||||
|
"and" "or" "xor" "not" "not in" "in" "contains" "starts with" "ends with" "matches"))
|
||||||
|
|
||||||
|
[
|
||||||
|
","
|
||||||
|
"."
|
||||||
|
] @punctuation.delimiter
|
||||||
|
|
||||||
|
(symfony_property_access
|
||||||
|
"." @operator)
|
||||||
|
|
||||||
|
(symfony_method_call
|
||||||
|
"." @operator)
|
||||||
|
|
||||||
[
|
[
|
||||||
"("
|
"("
|
||||||
")"
|
")"
|
||||||
|
"["
|
||||||
|
"]"
|
||||||
(block_punctuation)
|
(block_punctuation)
|
||||||
] @punctuation.bracket
|
] @punctuation.bracket
|
||||||
|
|
||||||
|
(condition
|
||||||
|
"[" @punctuation.special)
|
||||||
|
|
||||||
|
(condition
|
||||||
|
"]" @punctuation.special)
|
||||||
|
|
||||||
|
(symfony_number) @number
|
||||||
|
|
||||||
|
(symfony_boolean) @boolean
|
||||||
|
|
||||||
|
(symfony_null) @constant.builtin
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,13 @@
|
||||||
(block) @indent.begin
|
(block) @indent.begin
|
||||||
|
|
||||||
"}" @indent.branch @indent.end
|
"}" @indent.end
|
||||||
|
|
||||||
(comment) @indent.ignore
|
[
|
||||||
|
"{"
|
||||||
|
"}"
|
||||||
|
] @indent.branch
|
||||||
|
|
||||||
|
[
|
||||||
|
(comment)
|
||||||
|
(multiline_value)
|
||||||
|
] @indent.ignore
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,13 @@
|
||||||
|
((multiline_line
|
||||||
|
(identifier) @_id
|
||||||
|
.
|
||||||
|
(multiline_value
|
||||||
|
(multiline_value_content) @injection.content))
|
||||||
|
(#lua-match? @_id "_CSS_DEFAULT_STYLE$")
|
||||||
|
(#set! injection.language "css"))
|
||||||
|
|
||||||
((comment) @injection.content
|
((comment) @injection.content
|
||||||
(#set! injection.language "comment"))
|
(#set! injection.language "comment"))
|
||||||
|
|
||||||
|
((single_line_comment) @injection.content
|
||||||
|
(#set! injection.language "comment"))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue