lux_lib/lua_rockspec/build/tree_sitter.rs
1use std::{collections::HashMap, path::PathBuf};
2
3#[derive(Debug, PartialEq, Default, Clone)]
4pub struct TreesitterParserBuildSpec {
5 /// Name of the parser language, e.g. "haskell"
6 pub lang: String,
7
8 /// Won't build the parser if `false`
9 /// (useful for packages that only include queries)
10 pub parser: bool,
11
12 /// Must the sources be generated?
13 pub generate: bool,
14
15 /// tree-sitter grammar's location (relative to the source root)
16 pub location: Option<PathBuf>,
17
18 /// Embedded queries to be installed in the `etc/queries` directory
19 pub queries: HashMap<PathBuf, String>,
20}