tree-sitter-xdy

Crates.iotree-sitter-xdy
lib.rstree-sitter-xdy
version0.8.3
created_at2025-04-24 01:05:50.964819+00
updated_at2025-05-04 20:34:49.697472+00
descriptiontree-sitter grammar for xDy dice expression language.
homepage
repositoryhttps://github.com/toddATavail/xdy
max_upload_size
id1646478
size138,910
Todd L Smith (toddATavail)

documentation

README

xDy: Tree-sitter

This is the Tree-sitter grammar for the xDy dice expression language. Most of the mainline documentation is in the compiler crate, where the compiler, optimizer, evaluator, and application reside.

Building

The Rust bindings are checked in, so you can build the compiler without doing anything special. The relevant build instructions are here, and you can safely ignore the directions hereinafter unless you want to build bindings for a different language or modify the grammar.

Generating the parser

To generate the parser, you need to have the tree-sitter command-line tool installed. There's a Rust version and a Node.js version, and you can find the pertinent installation instructions here. Once you have the tool installed, you can generate the parser using npm:

$ npm run build

Or using tree-sitter directly:

$ tree-sitter generate
$ tree-sitter build

Testing

After the parser has been generated, you can run the tests using npm:

$ tree-sitter test

Or you can run the grammar tests and the Rust integration test piecewise:

$ tree-sitter test
$ cargo test
Commit count: 16

cargo fmt