tree-sitter-dshl
v1.0.0
Published
Dagor Shader Language grammar for tree-sitter
Maintainers
Readme
tree-sitter-dshl
DSHL grammar for tree-sitter. DSHL is the shader language of the
Dagor Engine: it declares shaders, their variants and render
state, and the bindings of their variables, and wraps HLSL in hlsl { } blocks.
The grammar follows the shader compiler of the Dagor Engine. It does not expand includes or macros, so it accepts each
statement in each body: a macro body can hold the statements of any place where the macro is called. The text of an
HLSL block is one node with the ##if directives of the compiler between its parts; queries/injections.scm gives
that text to an HLSL grammar.
Versioning
The version of the grammar is a semantic version:
- A major release renames or removes a node kind or a field.
- A minor release adds node kinds, fields, or syntax.
- A patch release corrects the trees or the queries.
The supertypes and the required and multiple flags of src/node-types.json follow the rules of the grammar, and a
release of any kind can change them.
