tree-sitter/lib
Rich Siegel 150eb2966b Fixed warning/error when compiling with clang -Os.
DISCUSSION:

When compiling with `-Os` for "smallest, fastest", an error is reported in `parser.c`:

```
/Users/siegel/git/tree-sitter/lib/src/./parser.c:1368:10: error: unused variable 'did_merge' [-Werror,-Wunused-variable]
    bool did_merge = ts_stack_merge(self->stack, version, previous_version_count);
         ^
1 error generated.
```

This is because with `NDEBUG` set,  `assert(e)` collapses to `(void)0`,
which in turn means that `did_merge` does not actually get consumed.
This seems to get caught when compiling with `-Os`, but not otherwise.

Compiler version:
```
Apple clang version 13.0.0 (clang-1300.0.29.30)
Target: arm64-apple-darwin21.3.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
```
2022-03-04 18:00:16 -05:00
..
binding_rust Merge pull request #1589 from alex-pinkus/deduplicate-core-ids 2022-01-17 13:54:31 -08:00
binding_web libs: 0.20.6 2022-03-02 20:50:29 -08:00
include/tree_sitter Fix back compat by moving primary_field_ids to the end 2022-01-17 17:23:02 -08:00
src Fixed warning/error when compiling with clang -Os. 2022-03-04 18:00:16 -05:00
.ccls rust: Change QueryCursor::captures to expose the full match 2019-10-03 12:45:58 -07:00
Cargo.toml libs: 0.20.6 2022-03-02 20:50:29 -08:00
compile_flags.txt Add files needed for using clangd 2022-02-22 09:44:50 -08:00
README.md lib: remove utf8proc dependency (#436) 2019-10-14 11:18:39 -07:00

Subdirectories

  • src - C source code for the Tree-sitter library
  • include - C headers for the Tree-sitter library
  • binding_rust - Rust bindings to the Tree-sitter library
  • binding_web - JavaScript bindings to the Tree-sitter library, using WebAssembly