docs: various fixes

Closes https://github.com/tree-sitter/tree-sitter/issues/1317.
Closes https://github.com/tree-sitter/tree-sitter/issues/1752.
Closes https://github.com/tree-sitter/tree-sitter/issues/2439.

Co-authored-by: Simon Hengel <sol@typeful.net>
Co-authored-by: Akash Yadav <itsaky01@gmail.com>
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
Co-authored-by: Laytan Laats <laytanlaats@hotmail.com>
This commit is contained in:
dundargoc 2024-02-07 21:26:21 +01:00 committed by dundargoc
parent ea7f6e1fa3
commit df1fe842eb
15 changed files with 21 additions and 20 deletions

View file

@ -1768,7 +1768,7 @@ static unsigned ts_parser__condense_stack(TSParser *self) {
}
}
// Enfore a hard upper bound on the number of stack versions by
// Enforce a hard upper bound on the number of stack versions by
// discarding the least promising versions.
while (ts_stack_version_count(self->stack) > MAX_VERSION_COUNT) {
ts_stack_remove_version(self->stack, MAX_VERSION_COUNT);

View file

@ -3849,7 +3849,7 @@ static inline bool ts_query_cursor__advance(
continue;
}
// Enfore the longest-match criteria. When a query pattern contains optional or
// Enforce the longest-match criteria. When a query pattern contains optional or
// repeated nodes, this is necessary to avoid multiple redundant states, where
// one state has a strict subset of another state's captures.
bool did_remove = false;

View file

@ -7,12 +7,12 @@
* https://docs.wasmtime.dev/api/wasmtime/struct.Config.html#method.async_support
*
* All WebAssembly executes synchronously, but an async support enables the Wasm code
* be executed on a seperate stack, so it can be paused and resumed. There are three
* be executed on a separate stack, so it can be paused and resumed. There are three
* mechanisms for yielding control from wasm to the caller: fuel, epochs, and async host functions.
*
* When WebAssembly is executed, a #wasmtime_call_future_t is returned. This struct represents the
* state of the execution and each call to #wasmtime_call_future_poll will execute the WebAssembly
* code on a seperate stack until the function returns or yields control back to the caller.
* code on a separate stack until the function returns or yields control back to the caller.
*
* It's expected these futures are pulled in a loop until completed, at which point the future
* should be deleted. Functions that return a #wasmtime_call_future_t are special in that all

View file

@ -337,7 +337,7 @@ WASM_API_EXTERN wasmtime_error_t* wasmtime_config_cache_config_load(wasm_config_
*
* This option defaults to the native host. Calling this method will
* additionally disable inference of the native features of the host (e.g.
* detection of SSE4.2 on x86_64 hosts). Native features can be reenabled with
* detection of SSE4.2 on x86_64 hosts). Native features can be re-enabled with
* the `cranelift_flag_{set,enable}` properties.
*
* For more information see the Rust documentation at

View file

@ -293,7 +293,7 @@ WASM_API_EXTERN bool wasmtime_linker_get(
);
/**
* \brief Preform all the checks for instantiating `module` with the linker,
* \brief Perform all the checks for instantiating `module` with the linker,
* except that instantiation doesn't actually finish.
*
* \param linker the linker used to instantiate the provided module.

View file

@ -43,7 +43,7 @@ typedef struct wasmtime_store wasmtime_store_t;
* \brief An interior pointer into a #wasmtime_store_t which is used as
* "context" for many functions.
*
* This context pointer is used pervasively throught Wasmtime's API. This can be
* This context pointer is used pervasively throughout Wasmtime's API. This can be
* acquired from #wasmtime_store_context or #wasmtime_caller_context. The
* context pointer for a store is the same for the entire lifetime of a store,
* so it can safely be stored adjacent to a #wasmtime_store_t itself.