parsers: add glsl parser

This commit is contained in:
Stephan Seitz 2021-09-11 17:26:06 +02:00
parent 4b3d58d39c
commit dea66fb4ce
6 changed files with 52 additions and 0 deletions

View file

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

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

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

View file

@ -0,0 +1,37 @@
; inherits: c
[
"in"
"out"
"inout"
"uniform"
"shared"
"layout"
"attribute"
"varying"
"buffer"
"coherent"
"readonly"
"writeonly"
"precision"
"highp"
"mediump"
"lowp"
"centroid"
"sample"
"patch"
"smooth"
"flat"
"noperspective"
"invariant"
"precise"
] @keyword
"subroutine" @keyword.function
(extension_storage_class) @attribute
(
(identifier) @variable.builtin
(#match? @variable.builtin "^gl_")
)

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

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

View file

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

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

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