Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d44d0f9

Browse files
LikeLakers2clason
authored andcommitted
docs(rust): improve bindings' crate doc
(cherry picked from commit 853ca46)
1 parent 69e857b commit d44d0f9

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

cli/src/templates/lib.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
//! This crate provides CAMEL_PARSER_NAME language support for the [tree-sitter][] parsing library.
1+
//! This crate provides CAMEL_PARSER_NAME language support for the [tree-sitter] parsing library.
22
//!
3-
//! Typically, you will use the [LANGUAGE][] constant to add this language to a
4-
//! tree-sitter [Parser][], and then use the parser to parse some code:
3+
//! Typically, you will use the [`LANGUAGE`] constant to add this language to a
4+
//! tree-sitter [`Parser`], and then use the parser to parse some code:
55
//!
66
//! ```
77
//! let code = r#"
@@ -15,7 +15,7 @@
1515
//! assert!(!tree.root_node().has_error());
1616
//! ```
1717
//!
18-
//! [Parser]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Parser.html
18+
//! [`Parser`]: https://docs.rs/tree-sitter/RUST_BINDING_VERSION/tree_sitter/struct.Parser.html
1919
//! [tree-sitter]: https://tree-sitter.github.io/
2020
2121
use tree_sitter_language::LanguageFn;
@@ -24,12 +24,10 @@ extern "C" {
2424
fn tree_sitter_PARSER_NAME() -> *const ();
2525
}
2626

27-
/// The tree-sitter [`LanguageFn`][LanguageFn] for this grammar.
28-
///
29-
/// [LanguageFn]: https://docs.rs/tree-sitter-language/*/tree_sitter_language/struct.LanguageFn.html
27+
/// The tree-sitter [`LanguageFn`] for this grammar.
3028
pub const LANGUAGE: LanguageFn = unsafe { LanguageFn::from_raw(tree_sitter_PARSER_NAME) };
3129

32-
/// The content of the [`node-types.json`][] file for this grammar.
30+
/// The content of the [`node-types.json`] file for this grammar.
3331
///
3432
/// [`node-types.json`]: https://tree-sitter.github.io/tree-sitter/using-parsers/6-static-node-types
3533
pub const NODE_TYPES: &str = include_str!("../../src/node-types.json");

0 commit comments

Comments
 (0)