parsers: add HLSL

This commit is contained in:
Stephan Seitz 2022-06-15 01:15:25 +02:00
parent d76b0de653
commit 29cf3fe42a
6 changed files with 38 additions and 0 deletions

View file

@ -171,6 +171,15 @@ list.glsl = {
maintainers = { "@theHamsta" },
}
list.hlsl = {
install_info = {
url = "https://github.com/theHamsta/tree-sitter-hlsl",
files = { "src/parser.c", "src/scanner.cc" },
generate_requires_npm = true,
},
maintainers = { "@theHamsta" },
}
list.dockerfile = {
install_info = {
url = "https://github.com/camdencheek/tree-sitter-dockerfile",

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

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

View file

@ -0,0 +1,23 @@
; inherits: cpp
[
"in"
"out"
"inout"
"uniform"
"shared"
"groupshared"
"discard"
"cbuffer"
"nointerpolation"
"row_major"
"column_major"
] @keyword
(
(identifier) @variable.builtin
(#lua-match? @variable.builtin "^SV_")
)
(hlsl_attribute) @attribute
(hlsl_attribute ["[" "]"] @attribute)

1
queries/hlsl/indents.scm Normal file
View file

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

View file

@ -0,0 +1,3 @@
(preproc_arg) @hlsl
(comment) @comment

1
queries/hlsl/locals.scm Normal file
View file

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