docs: change WASM/wasm to Wasm

That is the official capitalisation.
This commit is contained in:
ObserverOfTime 2025-08-19 12:32:46 +03:00
parent 7bc8f76667
commit 88e0b4cea4
36 changed files with 122 additions and 122 deletions

View file

@ -98,11 +98,11 @@ assert_eq!(
);
```
## Using WASM Grammar Files
## Using Wasm Grammar Files
> Requires the feature **wasm** to be enabled.
First, create a parser with a WASM store:
First, create a parser with a Wasm store:
```rust
use tree_sitter::{wasmtime::Engine, Parser, WasmStore};
@ -114,7 +114,7 @@ let mut parser = Parser::new();
parser.set_wasm_store(store).unwrap();
```
Then, load the language from a WASM file:
Then, load the language from a Wasm file:
```rust
const JAVASCRIPT_GRAMMAR: &[u8] = include_bytes!("path/to/tree-sitter-javascript.wasm");

View file

@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.71.1 */
/* automatically generated by rust-bindgen 0.72.0 */
pub const TREE_SITTER_LANGUAGE_VERSION: u32 = 15;
pub const TREE_SITTER_MIN_COMPATIBLE_LANGUAGE_VERSION: u32 = 13;
@ -928,7 +928,7 @@ extern "C" {
) -> *const TSLanguage;
}
extern "C" {
#[doc = " Get the number of languages instantiated in the given wasm store."]
#[doc = " Get the number of languages instantiated in the given Wasm store."]
pub fn ts_wasm_store_language_count(arg1: *const TSWasmStore) -> usize;
}
extern "C" {

View file

@ -365,7 +365,7 @@ pub struct QueryCapture<'tree> {
/// An error that occurred when trying to assign an incompatible [`Language`] to
/// a [`Parser`]. If the `wasm` feature is enabled, this can also indicate a failure
/// to load the wasm store.
/// to load the Wasm store.
#[derive(Debug, PartialEq, Eq)]
pub enum LanguageError {
Version(usize),
@ -3737,7 +3737,7 @@ impl fmt::Display for LanguageError {
}
#[cfg(feature = "wasm")]
Self::Wasm => {
write!(f, "Failed to load the wasm store.")
write!(f, "Failed to load the Wasm store.")
}
}
}

View file

@ -135,9 +135,9 @@ impl Drop for WasmStore {
impl fmt::Display for WasmError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let kind = match self.kind {
WasmErrorKind::Parse => "Failed to parse wasm",
WasmErrorKind::Compile => "Failed to compile wasm",
WasmErrorKind::Instantiate => "Failed to instantiate wasm module",
WasmErrorKind::Parse => "Failed to parse Wasm",
WasmErrorKind::Compile => "Failed to compile Wasm",
WasmErrorKind::Instantiate => "Failed to instantiate Wasm module",
WasmErrorKind::Other => "Unknown error",
};
write!(f, "{kind}: {}", self.message)