1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//! Bundled tree-sitter highlight, injection, and locals queries.
//!
//! Queries are embedded from `parsers/{lang}/queries/*.scm` at build time.
//! Not all languages have queries — returns `None` for languages without bundled queries.
include!;
/// Get the highlights query for a language, if bundled.
///
/// Returns the contents of `highlights.scm` as a static string, or `None`
/// if no highlights query is bundled for this language.
///
/// # Example
///
/// ```
/// use tree_sitter_language_pack::get_highlights_query;
///
/// // Returns Some(...) for languages with bundled queries
/// let query = get_highlights_query("python");
/// // Returns None for languages without bundled highlights queries
/// let missing = get_highlights_query("nonexistent_lang");
/// assert!(missing.is_none());
/// ```
/// Get the injections query for a language, if bundled.
///
/// Returns the contents of `injections.scm` as a static string, or `None`
/// if no injections query is bundled for this language.
///
/// # Example
///
/// ```
/// use tree_sitter_language_pack::get_injections_query;
///
/// let query = get_injections_query("markdown");
/// // Returns None for languages without bundled injections queries
/// let missing = get_injections_query("nonexistent_lang");
/// assert!(missing.is_none());
/// ```
/// Get the locals query for a language, if bundled.
///
/// Returns the contents of `locals.scm` as a static string, or `None`
/// if no locals query is bundled for this language.
///
/// # Example
///
/// ```
/// use tree_sitter_language_pack::get_locals_query;
///
/// let query = get_locals_query("python");
/// // Returns None for languages without bundled locals queries
/// let missing = get_locals_query("nonexistent_lang");
/// assert!(missing.is_none());
/// ```