mirror of
https://github.com/kristoferssolo/tree-sitter-bruno.git
synced 2026-03-22 00:36:24 +00:00
chore: update packages
This commit is contained in:
6
bindings/rust/build.rs
generated
6
bindings/rust/build.rs
generated
@@ -12,8 +12,10 @@ fn main() {
|
||||
println!("cargo:rerun-if-changed={}", parser_path.to_str().unwrap());
|
||||
|
||||
let scanner_path = src_dir.join("scanner.c");
|
||||
c_config.file(&scanner_path);
|
||||
println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap());
|
||||
if scanner_path.exists() {
|
||||
c_config.file(&scanner_path);
|
||||
println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap());
|
||||
}
|
||||
|
||||
c_config.compile("tree-sitter-bruno");
|
||||
}
|
||||
|
||||
24
bindings/rust/lib.rs
generated
24
bindings/rust/lib.rs
generated
@@ -1,7 +1,7 @@
|
||||
//! This crate provides Bruno language support for the [tree-sitter][] parsing library.
|
||||
//! This crate provides Bruno language support for the [tree-sitter] parsing library.
|
||||
//!
|
||||
//! Typically, you will use the [LANGUAGE][] constant to add this language to a
|
||||
//! tree-sitter [Parser][], and then use the parser to parse some code:
|
||||
//! Typically, you will use the [`LANGUAGE`] constant to add this language to a
|
||||
//! tree-sitter [`Parser`], and then use the parser to parse some code:
|
||||
//!
|
||||
//! ```
|
||||
//! let code = r#"
|
||||
@@ -15,7 +15,7 @@
|
||||
//! assert!(!tree.root_node().has_error());
|
||||
//! ```
|
||||
//!
|
||||
//! [Parser]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Parser.html
|
||||
//! [`Parser`]: https://docs.rs/tree-sitter/0.25.10/tree_sitter/struct.Parser.html
|
||||
//! [tree-sitter]: https://tree-sitter.github.io/
|
||||
|
||||
use tree_sitter_language::LanguageFn;
|
||||
@@ -24,22 +24,20 @@ extern "C" {
|
||||
fn tree_sitter_bruno() -> *const ();
|
||||
}
|
||||
|
||||
/// The tree-sitter [`LanguageFn`][LanguageFn] for this grammar.
|
||||
///
|
||||
/// [LanguageFn]: https://docs.rs/tree-sitter-language/*/tree_sitter_language/struct.LanguageFn.html
|
||||
/// The tree-sitter [`LanguageFn`] for this grammar.
|
||||
pub const LANGUAGE: LanguageFn = unsafe { LanguageFn::from_raw(tree_sitter_bruno) };
|
||||
|
||||
/// The content of the [`node-types.json`][] file for this grammar.
|
||||
/// The content of the [`node-types.json`] file for this grammar.
|
||||
///
|
||||
/// [`node-types.json`]: https://tree-sitter.github.io/tree-sitter/using-parsers#static-node-types
|
||||
/// [`node-types.json`]: https://tree-sitter.github.io/tree-sitter/using-parsers/6-static-node-types
|
||||
pub const NODE_TYPES: &str = include_str!("../../src/node-types.json");
|
||||
|
||||
// NOTE: uncomment these to include any queries that this grammar contains:
|
||||
|
||||
pub const HIGHLIGHTS_QUERY: &str = include_str!("../../queries/bruno/highlights.scm");
|
||||
pub const INJECTIONS_QUERY: &str = include_str!("../../queries/bruno/injections.scm");
|
||||
// pub const LOCALS_QUERY: &str = include_str!("../../queries/bruno/locals.scm");
|
||||
pub const TAGS_QUERY: &str = include_str!("../../queries/bruno/tags.scm");
|
||||
// pub const HIGHLIGHTS_QUERY: &str = include_str!("../../queries/highlights.scm");
|
||||
// pub const INJECTIONS_QUERY: &str = include_str!("../../queries/injections.scm");
|
||||
// pub const LOCALS_QUERY: &str = include_str!("../../queries/locals.scm");
|
||||
// pub const TAGS_QUERY: &str = include_str!("../../queries/tags.scm");
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
||||
Reference in New Issue
Block a user