mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat(streamdevice_proto): add parser and queries
This commit is contained in:
parent
6e42d823ce
commit
5d9526e9b0
6 changed files with 149 additions and 0 deletions
2
SUPPORTED_LANGUAGES.md
generated
2
SUPPORTED_LANGUAGES.md
generated
|
|
@ -275,6 +275,7 @@ jsx (queries only)[^jsx] | unstable | `HFIJ ` | @steelsojka
|
||||||
[ssh_config](https://github.com/tree-sitter-grammars/tree-sitter-ssh-config) | unstable | `HFIJL` | @ObserverOfTime
|
[ssh_config](https://github.com/tree-sitter-grammars/tree-sitter-ssh-config) | unstable | `HFIJL` | @ObserverOfTime
|
||||||
[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
|
||||||
|
[streamdevice_proto](https://github.com/minijackson/tree-sitter-streamdevice-proto)[^streamdevice_proto] | unstable | `H IJL` | @minijackson
|
||||||
[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) | unstable | `HFIJL` | @madskjeldgaard
|
[supercollider](https://github.com/madskjeldgaard/tree-sitter-supercollider) | unstable | `HFIJL` | @madskjeldgaard
|
||||||
[superhtml](https://github.com/kristoff-it/superhtml) | unstable | `H J ` | @rockorager
|
[superhtml](https://github.com/kristoff-it/superhtml) | unstable | `H J ` | @rockorager
|
||||||
|
|
@ -360,4 +361,5 @@ jsx (queries only)[^jsx] | unstable | `HFIJ ` | @steelsojka
|
||||||
[^sflog]: Salesforce debug log
|
[^sflog]: Salesforce debug log
|
||||||
[^slang]: Shader Slang
|
[^slang]: Shader Slang
|
||||||
[^snl]: EPICS Sequencer's SNL files
|
[^snl]: EPICS Sequencer's SNL files
|
||||||
|
[^streamdevice_proto]: EPICS StreamDevice .proto files
|
||||||
<!--parserinfo-->
|
<!--parserinfo-->
|
||||||
|
|
|
||||||
|
|
@ -2161,6 +2161,15 @@ return {
|
||||||
maintainers = { '@amaanq' },
|
maintainers = { '@amaanq' },
|
||||||
tier = 2,
|
tier = 2,
|
||||||
},
|
},
|
||||||
|
streamdevice_proto = {
|
||||||
|
install_info = {
|
||||||
|
revision = 'b638715ae8deb91c8bfedd7ff1fb27650f6e0309',
|
||||||
|
url = 'https://github.com/minijackson/tree-sitter-streamdevice-proto',
|
||||||
|
},
|
||||||
|
maintainers = { '@minijackson' },
|
||||||
|
readme_note = 'EPICS StreamDevice .proto files',
|
||||||
|
tier = 2,
|
||||||
|
},
|
||||||
styled = {
|
styled = {
|
||||||
install_info = {
|
install_info = {
|
||||||
revision = '319cdcaa0346ba6db668a222d938e5c3569e2a51',
|
revision = '319cdcaa0346ba6db668a222d938e5c3569e2a51',
|
||||||
|
|
|
||||||
90
runtime/queries/streamdevice_proto/highlights.scm
Normal file
90
runtime/queries/streamdevice_proto/highlights.scm
Normal file
|
|
@ -0,0 +1,90 @@
|
||||||
|
(comment) @comment @spell
|
||||||
|
|
||||||
|
(variable_name) @constant
|
||||||
|
|
||||||
|
(enum_constant) @constant
|
||||||
|
|
||||||
|
(ascii_name) @constant.builtin
|
||||||
|
|
||||||
|
"=" @operator
|
||||||
|
|
||||||
|
[
|
||||||
|
(function_name)
|
||||||
|
(command_name)
|
||||||
|
(handler_name)
|
||||||
|
] @function
|
||||||
|
|
||||||
|
((command_name) @function.builtin
|
||||||
|
(#any-of? @function.builtin "out" "in" "wait" "event" "exec" "disconnect" "connect"))
|
||||||
|
|
||||||
|
((handler_name) @function.builtin
|
||||||
|
(#any-of? @function.builtin "mismatch" "writetimeout" "replytimeout" "readtimeout" "init"))
|
||||||
|
|
||||||
|
[
|
||||||
|
"{"
|
||||||
|
"}"
|
||||||
|
"["
|
||||||
|
"]"
|
||||||
|
"("
|
||||||
|
")"
|
||||||
|
"<"
|
||||||
|
">"
|
||||||
|
] @punctuation.bracket
|
||||||
|
|
||||||
|
[
|
||||||
|
"$"
|
||||||
|
"\\$"
|
||||||
|
"@"
|
||||||
|
"/"
|
||||||
|
"#/"
|
||||||
|
] @punctuation.special
|
||||||
|
|
||||||
|
(variable_expansion
|
||||||
|
[
|
||||||
|
"\\${"
|
||||||
|
"}"
|
||||||
|
] @punctuation.special)
|
||||||
|
|
||||||
|
(format_converter
|
||||||
|
[
|
||||||
|
"%"
|
||||||
|
"{"
|
||||||
|
"}"
|
||||||
|
"["
|
||||||
|
"]"
|
||||||
|
"("
|
||||||
|
")"
|
||||||
|
"<"
|
||||||
|
">"
|
||||||
|
"#/"
|
||||||
|
"/"
|
||||||
|
] @punctuation.special)
|
||||||
|
|
||||||
|
[
|
||||||
|
"|"
|
||||||
|
";"
|
||||||
|
","
|
||||||
|
"."
|
||||||
|
] @punctuation.delimiter
|
||||||
|
|
||||||
|
(quoted_literal) @string
|
||||||
|
|
||||||
|
(escape_sequence) @string.escape
|
||||||
|
|
||||||
|
(format_converter) @function.builtin
|
||||||
|
|
||||||
|
(checksum_flag) @operator
|
||||||
|
|
||||||
|
(checksum) @function
|
||||||
|
|
||||||
|
(regex_pattern) @string.regexp
|
||||||
|
|
||||||
|
(time_conversion_spec) @constant.builtin
|
||||||
|
|
||||||
|
(keyword) @keyword
|
||||||
|
|
||||||
|
(record_name) @constant
|
||||||
|
|
||||||
|
(field_name) @variable.member
|
||||||
|
|
||||||
|
(number) @number
|
||||||
21
runtime/queries/streamdevice_proto/indents.scm
Normal file
21
runtime/queries/streamdevice_proto/indents.scm
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
[
|
||||||
|
(function)
|
||||||
|
(handler)
|
||||||
|
] @indent.begin
|
||||||
|
|
||||||
|
[
|
||||||
|
"{"
|
||||||
|
"}"
|
||||||
|
"("
|
||||||
|
")"
|
||||||
|
] @indent.branch
|
||||||
|
|
||||||
|
[
|
||||||
|
"}"
|
||||||
|
")"
|
||||||
|
] @indent.end
|
||||||
|
|
||||||
|
[
|
||||||
|
(comment)
|
||||||
|
(string)
|
||||||
|
] @indent.auto
|
||||||
5
runtime/queries/streamdevice_proto/injections.scm
Normal file
5
runtime/queries/streamdevice_proto/injections.scm
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
((comment) @injection.content
|
||||||
|
(#set! injection.language "comment"))
|
||||||
|
|
||||||
|
((regex_pattern) @injection.content
|
||||||
|
(#set! injection.language "regex"))
|
||||||
22
runtime/queries/streamdevice_proto/locals.scm
Normal file
22
runtime/queries/streamdevice_proto/locals.scm
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
(source_file) @local.scope
|
||||||
|
|
||||||
|
; The content of a function is a scope, not the whole function block.
|
||||||
|
; Else, the function is defined inside itself
|
||||||
|
(function
|
||||||
|
.
|
||||||
|
(function_name)
|
||||||
|
.
|
||||||
|
(_) @local.scope)
|
||||||
|
|
||||||
|
(function
|
||||||
|
.
|
||||||
|
(function_name) @local.definition.function)
|
||||||
|
|
||||||
|
(assignment
|
||||||
|
(variable_name) @local.definition.var)
|
||||||
|
|
||||||
|
(variable_name) @local.reference
|
||||||
|
|
||||||
|
((handler
|
||||||
|
(function_name) @local.reference)
|
||||||
|
(#set! reference.kind "call"))
|
||||||
Loading…
Add table
Add a link
Reference in a new issue