mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 11:06:54 -04:00
feat(supercollider)!: update parser and queries
parser PR: https://github.com/madskjeldgaard/tree-sitter-supercollider/pull/67 removed nodes: control_structure, if, while, for, forby, method_call, method_name, instance_variable_setter_call, argument_calls added nodes: class_def_body, !==, === modified nodes: function_call now has fields receiver, name and arguments chained method calls now appear as nested function_calls (where receiver is another function_call)
This commit is contained in:
parent
972f378653
commit
544320a9cf
6 changed files with 73 additions and 29 deletions
2
SUPPORTED_LANGUAGES.md
generated
2
SUPPORTED_LANGUAGES.md
generated
|
|
@ -277,7 +277,7 @@ jsx (queries only)[^jsx] | unstable | `HFIJ ` | @steelsojka
|
||||||
[starlark](https://github.com/tree-sitter-grammars/tree-sitter-starlark) | unstable | `HFIJL` | @amaanq
|
[starlark](https://github.com/tree-sitter-grammars/tree-sitter-starlark) | unstable | `HFIJL` | @amaanq
|
||||||
[strace](https://github.com/sigmaSd/tree-sitter-strace) | unstable | `H J ` | @amaanq
|
[strace](https://github.com/sigmaSd/tree-sitter-strace) | unstable | `H J ` | @amaanq
|
||||||
[styled](https://github.com/mskelton/tree-sitter-styled) | unstable | `HFIJ ` | @mskelton
|
[styled](https://github.com/mskelton/tree-sitter-styled) | unstable | `HFIJ ` | @mskelton
|
||||||
[supercollider](https://github.com/madskjeldgaard/tree-sitter-supercollider) | unmaintained | `HFIJL` | @madskjeldgaard
|
[supercollider](https://github.com/madskjeldgaard/tree-sitter-supercollider) | unstable | `HFIJL` | @madskjeldgaard, @elgiano
|
||||||
[superhtml](https://github.com/kristoff-it/superhtml) | unstable | `H J ` | @rockorager
|
[superhtml](https://github.com/kristoff-it/superhtml) | unstable | `H J ` | @rockorager
|
||||||
[surface](https://github.com/connorlay/tree-sitter-surface) | unstable | `HFIJ ` | @connorlay
|
[surface](https://github.com/connorlay/tree-sitter-surface) | unstable | `HFIJ ` | @connorlay
|
||||||
[svelte](https://github.com/tree-sitter-grammars/tree-sitter-svelte) | unstable | `HFIJL` | @amaanq
|
[svelte](https://github.com/tree-sitter-grammars/tree-sitter-svelte) | unstable | `HFIJL` | @amaanq
|
||||||
|
|
|
||||||
|
|
@ -2184,11 +2184,11 @@ return {
|
||||||
},
|
},
|
||||||
supercollider = {
|
supercollider = {
|
||||||
install_info = {
|
install_info = {
|
||||||
revision = '76b3cab1773f08bb7d3a185420b0a44c6da8c294',
|
revision = 'e2d1480de0a62cd53f81645cb39bc1f3fa2dce5a',
|
||||||
url = 'https://github.com/madskjeldgaard/tree-sitter-supercollider',
|
url = 'https://github.com/madskjeldgaard/tree-sitter-supercollider',
|
||||||
},
|
},
|
||||||
maintainers = { '@madskjeldgaard' },
|
maintainers = { '@madskjeldgaard', '@elgiano' },
|
||||||
tier = 3,
|
tier = 2,
|
||||||
},
|
},
|
||||||
superhtml = {
|
superhtml = {
|
||||||
install_info = {
|
install_info = {
|
||||||
|
|
|
||||||
|
|
@ -2,5 +2,4 @@
|
||||||
(function_call)
|
(function_call)
|
||||||
(code_block)
|
(code_block)
|
||||||
(function_block)
|
(function_block)
|
||||||
(control_structure)
|
|
||||||
] @fold
|
] @fold
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
; highlights.scm
|
; highlights.scm
|
||||||
; See this for full list: https://github.com/nvim-treesitter/nvim-treesitter/blob/master/CONTRIBUTING.md
|
; See this for full list: https://github.com/nvim-treesitter/nvim-treesitter/blob/master/CONTRIBUTING.md
|
||||||
; comments
|
; Comments
|
||||||
(line_comment) @comment @spell
|
(line_comment) @comment @spell
|
||||||
|
|
||||||
(block_comment) @comment @spell
|
(block_comment) @comment @spell
|
||||||
|
|
@ -9,6 +9,12 @@
|
||||||
(argument
|
(argument
|
||||||
name: (identifier) @variable.parameter)
|
name: (identifier) @variable.parameter)
|
||||||
|
|
||||||
|
"..." @variable.parameter ; variable argument
|
||||||
|
|
||||||
|
; For function calls
|
||||||
|
(named_argument
|
||||||
|
name: (identifier) @variable.parameter)
|
||||||
|
|
||||||
; Variables
|
; Variables
|
||||||
(local_var
|
(local_var
|
||||||
name: (identifier) @variable)
|
name: (identifier) @variable)
|
||||||
|
|
@ -18,31 +24,58 @@
|
||||||
|
|
||||||
(builtin_var) @constant.builtin
|
(builtin_var) @constant.builtin
|
||||||
|
|
||||||
; (variable) @variable
|
|
||||||
; Functions
|
; Functions
|
||||||
(function_definition
|
(function_definition
|
||||||
name: (variable) @function)
|
name: (variable) @function)
|
||||||
|
|
||||||
; For function calls
|
|
||||||
(named_argument
|
|
||||||
name: (identifier) @function.call)
|
|
||||||
|
|
||||||
; Methods
|
; Methods
|
||||||
(method_call
|
(function_call
|
||||||
name: (method_name) @function.method.call)
|
name: (_) @function.method.call)
|
||||||
|
|
||||||
|
; Collections
|
||||||
|
(associative_item
|
||||||
|
(identifier) @property)
|
||||||
|
|
||||||
; Classes
|
; Classes
|
||||||
(class) @type
|
(class) @type
|
||||||
|
|
||||||
|
(parent_class) @type
|
||||||
|
|
||||||
|
(instance_method_name) @function.method
|
||||||
|
|
||||||
|
(class_method_name) @function.method
|
||||||
|
|
||||||
; Literals
|
; Literals
|
||||||
|
(bool) @boolean
|
||||||
|
|
||||||
(number) @number
|
(number) @number
|
||||||
|
|
||||||
(float) @number.float
|
(float) @number.float
|
||||||
|
|
||||||
(string) @string
|
(string) @string
|
||||||
|
|
||||||
|
(escape_sequence) @string.escape
|
||||||
|
|
||||||
(symbol) @string.special.symbol
|
(symbol) @string.special.symbol
|
||||||
|
|
||||||
|
; Conditionals
|
||||||
|
[
|
||||||
|
"?"
|
||||||
|
"!?"
|
||||||
|
"??"
|
||||||
|
] @keyword.conditional
|
||||||
|
|
||||||
|
((function_call
|
||||||
|
name: (_) @keyword.conditional)
|
||||||
|
(#any-of? @keyword.conditional "if" "while" "case" "switch" "try" "protect"))
|
||||||
|
|
||||||
|
((function_call
|
||||||
|
name: (_) @keyword.repeat)
|
||||||
|
(#any-of? @keyword.repeat "for" "forBy"))
|
||||||
|
|
||||||
|
; Duplication operator
|
||||||
|
"!" @keyword.repeat
|
||||||
|
|
||||||
; Operators
|
; Operators
|
||||||
[
|
[
|
||||||
"&&"
|
"&&"
|
||||||
|
|
@ -52,6 +85,8 @@
|
||||||
"^"
|
"^"
|
||||||
"=="
|
"=="
|
||||||
"!="
|
"!="
|
||||||
|
"==="
|
||||||
|
"!=="
|
||||||
"<"
|
"<"
|
||||||
"<="
|
"<="
|
||||||
">"
|
">"
|
||||||
|
|
@ -64,6 +99,13 @@
|
||||||
"/"
|
"/"
|
||||||
"%"
|
"%"
|
||||||
"="
|
"="
|
||||||
|
"@"
|
||||||
|
"|@|"
|
||||||
|
"@@"
|
||||||
|
"@|@"
|
||||||
|
"++"
|
||||||
|
"+/+"
|
||||||
|
".."
|
||||||
] @operator
|
] @operator
|
||||||
|
|
||||||
; Keywords
|
; Keywords
|
||||||
|
|
@ -71,11 +113,13 @@
|
||||||
"arg"
|
"arg"
|
||||||
"classvar"
|
"classvar"
|
||||||
"const"
|
"const"
|
||||||
; "super"
|
|
||||||
; "this"
|
|
||||||
"var"
|
"var"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
((local_var
|
||||||
|
name: (identifier) @variable.builtin)
|
||||||
|
(#any-of? @variable.builtin "this" "super"))
|
||||||
|
|
||||||
; Brackets
|
; Brackets
|
||||||
[
|
[
|
||||||
"("
|
"("
|
||||||
|
|
@ -92,12 +136,5 @@
|
||||||
";"
|
";"
|
||||||
"."
|
"."
|
||||||
","
|
","
|
||||||
|
":"
|
||||||
] @punctuation.delimiter
|
] @punctuation.delimiter
|
||||||
|
|
||||||
; control structure
|
|
||||||
(control_structure) @keyword.conditional
|
|
||||||
|
|
||||||
(escape_sequence) @string.escape
|
|
||||||
|
|
||||||
; SinOsc.ar()!2
|
|
||||||
(duplicated_statement) @keyword.repeat
|
|
||||||
|
|
|
||||||
|
|
@ -12,21 +12,30 @@
|
||||||
(variable_definition)
|
(variable_definition)
|
||||||
(variable_definition_sequence
|
(variable_definition_sequence
|
||||||
(variable_definition))
|
(variable_definition))
|
||||||
(control_structure)
|
|
||||||
(return_statement)
|
(return_statement)
|
||||||
] @indent.begin
|
] @indent.begin
|
||||||
|
|
||||||
[
|
[
|
||||||
(parameter_call_list
|
(parameter_call_list
|
||||||
(argument_calls))
|
(_))
|
||||||
"("
|
|
||||||
")"
|
")"
|
||||||
"{"
|
|
||||||
"}"
|
"}"
|
||||||
"["
|
|
||||||
"]"
|
"]"
|
||||||
] @indent.branch
|
] @indent.branch
|
||||||
|
|
||||||
|
; for auto-indent while typing
|
||||||
|
(ERROR
|
||||||
|
"{") @indent.begin
|
||||||
|
|
||||||
|
(ERROR
|
||||||
|
"}") @indent.branch
|
||||||
|
|
||||||
|
(ERROR
|
||||||
|
"[") @indent.begin
|
||||||
|
|
||||||
|
(ERROR
|
||||||
|
"]") @indent.branch
|
||||||
|
|
||||||
[
|
[
|
||||||
(block_comment)
|
(block_comment)
|
||||||
(line_comment)
|
(line_comment)
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
(function_call)
|
(function_call)
|
||||||
(code_block)
|
(code_block)
|
||||||
(function_block)
|
(function_block)
|
||||||
(control_structure)
|
|
||||||
] @local.scope
|
] @local.scope
|
||||||
|
|
||||||
; Definitions
|
; Definitions
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue