arborium_prolog/
lib.rs

1//! THIS FILE IS GENERATED FROM xtask/templates/lib.stpl.rs; DO NOT EDIT MANUALLY
2
3#![doc = include_str!("../README.md")]
4
5use tree_sitter_language::LanguageFn;
6
7unsafe extern "C" {
8    fn tree_sitter_prolog() -> *const ();
9}
10
11/// Returns the prolog tree-sitter [`LanguageFn`].
12pub const fn language() -> LanguageFn {
13    unsafe { LanguageFn::from_raw(tree_sitter_prolog) }
14}
15
16
17
18/// The highlights query for prolog.
19pub const HIGHLIGHTS_QUERY: &str = include_str!("../queries/highlights.scm");
20
21
22
23
24/// The injections query for prolog (empty - no injections available).
25pub const INJECTIONS_QUERY: &str = "";
26
27
28
29/// The locals query for prolog (empty - no locals available).
30pub const LOCALS_QUERY: &str = "";
31
32
33
34#[cfg(test)]
35mod tests {
36    use super::*;
37
38    #[test]
39    fn test_grammar() {
40        arborium_test_harness::test_grammar(
41            language(),
42            "prolog",
43
44            HIGHLIGHTS_QUERY,
45
46            INJECTIONS_QUERY,
47            LOCALS_QUERY,
48            env!("CARGO_MANIFEST_DIR"),
49        );
50    }
51
52    #[test]
53    fn test_corpus() {
54        arborium_test_harness::test_corpus(language(), "prolog", env!("CARGO_MANIFEST_DIR"));
55    }
56}