diff --git a/README.md b/README.md index e74c6e45..6839af48 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,7 @@ # tree-sitter -[![CICD badge]][CICD] [![DOI](https://zenodo.org/badge/14164618.svg)](https://zenodo.org/badge/latestdoi/14164618) -[CICD badge]: https://github.com/tree-sitter/tree-sitter/actions/workflows/CICD.yml/badge.svg -[CICD]: https://github.com/tree-sitter/tree-sitter/actions/workflows/CICD.yml - Tree-sitter is a parser generator tool and an incremental parsing library. It can build a concrete syntax tree for a source file and efficiently update the syntax tree as the source file is edited. Tree-sitter aims to be: - **General** enough to parse any programming language diff --git a/cli/src/generate/build_tables/item_set_builder.rs b/cli/src/generate/build_tables/item_set_builder.rs index 6b6c3304..8f9644d0 100644 --- a/cli/src/generate/build_tables/item_set_builder.rs +++ b/cli/src/generate/build_tables/item_set_builder.rs @@ -69,7 +69,7 @@ impl<'a> ParseItemSetBuilder<'a> { } // The FIRST set of a non-terminal `i` is the union of the following sets: - // * the set of all terminals that appear at the beginings of i's productions + // * the set of all terminals that appear at the beginnings of i's productions // * the FIRST sets of all the non-terminals that appear at the beginnings // of i's productions // diff --git a/cli/src/tests/parser_hang_test.rs b/cli/src/tests/parser_hang_test.rs index fe646d53..0c742d80 100644 --- a/cli/src/tests/parser_hang_test.rs +++ b/cli/src/tests/parser_hang_test.rs @@ -14,7 +14,7 @@ use tree_sitter::Parser; // The `sanitizing` cfg is required to don't run tests under specific sunitizer // because they don't work well with subprocesses _(it's an assumption)_. // -// Bellow are two alternative examples of how to disable tests for some arches +// Below are two alternative examples of how to disable tests for some arches // if a way with excluding the whole mod from compilation wouldn't work well. // // XXX: Also may be it makes sense to keep such tests as ignored by default diff --git a/cli/src/tests/tree_test.rs b/cli/src/tests/tree_test.rs index c41cf802..f498c5fc 100644 --- a/cli/src/tests/tree_test.rs +++ b/cli/src/tests/tree_test.rs @@ -44,7 +44,7 @@ fn test_tree_edit() { } // edit starting in the tree's padding but extending into its content: - // shrink the content to compenstate for the expanded padding. + // shrink the content to compensate for the expanded padding. { let mut tree = tree.clone(); tree.edit(&InputEdit { diff --git a/docs/index.md b/docs/index.md index 0a342310..71052654 100644 --- a/docs/index.md +++ b/docs/index.md @@ -20,14 +20,16 @@ There are currently bindings that allow Tree-sitter to be used from the followin * [Guile](https://github.com/Z572/guile-ts) * [Haskell](https://github.com/tree-sitter/haskell-tree-sitter) * [Java](https://github.com/serenadeai/java-tree-sitter) +* [Java (Android)](https://github.com/AndroidIDEOfficial/android-tree-sitter) * [JavaScript (Node.js)](https://github.com/tree-sitter/node-tree-sitter) * [JavaScript (Wasm)](https://github.com/tree-sitter/tree-sitter/tree/master/lib/binding_web) * [Kotlin](https://github.com/oxisto/kotlintree) * [Lua](https://github.com/euclidianAce/ltreesitter) * [OCaml](https://github.com/returntocorp/ocaml-tree-sitter-core) +* [Odin](https://github.com/laytan/odin-tree-sitter) * [Perl](https://metacpan.org/pod/Text::Treesitter) * [Python](https://github.com/tree-sitter/py-tree-sitter) -* [Ruby](https://github.com/tree-sitter/ruby-tree-sitter) +* [Ruby](https://github.com/Faveod/ruby-tree-sitter) * [Ruby](https://github.com/calicoday/ruby-tree-sitter-ffi) * [Rust](https://github.com/tree-sitter/tree-sitter/tree/master/lib/binding_rust) * [Swift](https://github.com/ChimeHQ/SwiftTreeSitter) @@ -94,7 +96,8 @@ There are currently bindings that allow Tree-sitter to be used from the followin * [LLVM MachineIR](https://github.com/Flakebi/tree-sitter-llvm-mir) * [LLVM MLIR](https://github.com/artagnon/tree-sitter-mlir) * [LLVM TableGen](https://github.com/Flakebi/tree-sitter-tablegen) -* [Lua](https://github.com/Azganoth/tree-sitter-lua) +* [Lua](https://github.com/MunifTanjim/tree-sitter-lua) +* [Magik](https://github.com/krn-robin/tree-sitter-magik) * [Make](https://github.com/alemuller/tree-sitter-make) * [Markdown](https://github.com/ikatyang/tree-sitter-markdown) * [Markdown](https://github.com/MDeiml/tree-sitter-markdown) @@ -106,6 +109,7 @@ There are currently bindings that allow Tree-sitter to be used from the followin * [Noir](https://github.com/hhamud/tree-sitter-noir) * [Objective-C](https://github.com/jiyee/tree-sitter-objc) * [OCaml](https://github.com/tree-sitter/tree-sitter-ocaml) +* [Odin](https://github.com/amaanq/tree-sitter-odin) * [Org](https://github.com/milisims/tree-sitter-org) * [P4](https://github.com/ace-design/tree-sitter-p4) * [Pascal](https://github.com/Isopod/tree-sitter-pascal) @@ -142,6 +146,7 @@ There are currently bindings that allow Tree-sitter to be used from the followin * [SQL - PostgreSQL](https://github.com/m-novikov/tree-sitter-sql) * [SQL - SQLite](https://github.com/dhcmrlchtdj/tree-sitter-sqlite) * [SSH](https://github.com/metio/tree-sitter-ssh-client-config) +* [Supercollider](https://github.com/madskjeldgaard/tree-sitter-supercollider) * [Svelte](https://github.com/Himujjal/tree-sitter-svelte) * [Swift](https://github.com/alex-pinkus/tree-sitter-swift) * [SystemRDL](https://github.com/SystemRDL/tree-sitter-systemrdl) diff --git a/docs/section-2-using-parsers.md b/docs/section-2-using-parsers.md index 97719c4f..a886f6ff 100644 --- a/docs/section-2-using-parsers.md +++ b/docs/section-2-using-parsers.md @@ -137,7 +137,7 @@ TSTree *ts_parser_parse( ); ``` -The `TSInput` structure lets you to provide your own function for reading a chunk of text at a given byte offset and row/column position. The function can return text encoded in either UTF8 or UTF16. This interface allows you to efficiently parse text that is stored in your own data structure. +The `TSInput` structure lets you provide your own function for reading a chunk of text at a given byte offset and row/column position. The function can return text encoded in either UTF8 or UTF16. This interface allows you to efficiently parse text that is stored in your own data structure. ```c typedef struct { diff --git a/docs/section-3-creating-parsers.md b/docs/section-3-creating-parsers.md index 64118682..7ff0ae96 100644 --- a/docs/section-3-creating-parsers.md +++ b/docs/section-3-creating-parsers.md @@ -5,7 +5,7 @@ permalink: creating-parsers # Creating parsers -Developing Tree-sitter grammars can have a difficult learning curve, but once you get the hang of it, it can be fun and even zen-like. This document will help get you to get started and to develop a useful mental model. +Developing Tree-sitter grammars can have a difficult learning curve, but once you get the hang of it, it can be fun and even zen-like. This document will help you to get started and to develop a useful mental model. ## Getting Started diff --git a/lib/binding_rust/bindings.rs b/lib/binding_rust/bindings.rs index dc513939..227d142d 100644 --- a/lib/binding_rust/bindings.rs +++ b/lib/binding_rust/bindings.rs @@ -824,7 +824,7 @@ extern "C" { pub fn ts_wasm_store_language_count(arg1: *const TSWasmStore) -> usize; } extern "C" { - #[doc = " Check if the language came from a Wasm module. If so, then in order to use\n this langauge with a Parser, that parser must have a Wasm store assigned."] + #[doc = " Check if the language came from a Wasm module. If so, then in order to use\n this language with a Parser, that parser must have a Wasm store assigned."] pub fn ts_language_is_wasm(arg1: *const TSLanguage) -> bool; } extern "C" { diff --git a/lib/include/tree_sitter/api.h b/lib/include/tree_sitter/api.h index 68aa3dd8..4e0c193c 100644 --- a/lib/include/tree_sitter/api.h +++ b/lib/include/tree_sitter/api.h @@ -1208,7 +1208,7 @@ size_t ts_wasm_store_language_count(const TSWasmStore *); /** * Check if the language came from a Wasm module. If so, then in order to use - * this langauge with a Parser, that parser must have a Wasm store assigned. + * this language with a Parser, that parser must have a Wasm store assigned. */ bool ts_language_is_wasm(const TSLanguage *); diff --git a/lib/src/parser.c b/lib/src/parser.c index a94b17d0..efcc0456 100644 --- a/lib/src/parser.c +++ b/lib/src/parser.c @@ -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); diff --git a/lib/src/query.c b/lib/src/query.c index eb04cc78..b801dcd9 100644 --- a/lib/src/query.c +++ b/lib/src/query.c @@ -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; diff --git a/lib/src/wasm/wasmtime/async.h b/lib/src/wasm/wasmtime/async.h index 1b490003..cd2711e9 100644 --- a/lib/src/wasm/wasmtime/async.h +++ b/lib/src/wasm/wasmtime/async.h @@ -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 diff --git a/lib/src/wasm/wasmtime/config.h b/lib/src/wasm/wasmtime/config.h index b299d048..b7f3e149 100644 --- a/lib/src/wasm/wasmtime/config.h +++ b/lib/src/wasm/wasmtime/config.h @@ -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 diff --git a/lib/src/wasm/wasmtime/linker.h b/lib/src/wasm/wasmtime/linker.h index 750c18d8..d4a4acb8 100644 --- a/lib/src/wasm/wasmtime/linker.h +++ b/lib/src/wasm/wasmtime/linker.h @@ -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. diff --git a/lib/src/wasm/wasmtime/store.h b/lib/src/wasm/wasmtime/store.h index 740d98a3..570fbb69 100644 --- a/lib/src/wasm/wasmtime/store.h +++ b/lib/src/wasm/wasmtime/store.h @@ -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.