arborium_java/
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_java() -> *const ();
9}
10
11/// Returns the java tree-sitter [`LanguageFn`].
12pub const fn language() -> LanguageFn {
13    unsafe { LanguageFn::from_raw(tree_sitter_java) }
14}
15
16
17
18/// The highlights query for java.
19pub const HIGHLIGHTS_QUERY: &str = include_str!("../queries/highlights.scm");
20
21
22
23
24/// The injections query for java (empty - no injections available).
25pub const INJECTIONS_QUERY: &str = "";
26
27
28
29/// The locals query for java (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            "java",
43
44            HIGHLIGHTS_QUERY,
45
46            INJECTIONS_QUERY,
47            LOCALS_QUERY,
48            env!("CARGO_MANIFEST_DIR"),
49        );
50    }
51}