An incremental parsing system for programming tools https://tree-sitter.github.io
Find a file
Alex Pinkus 679a841183 Add pointer indirection to AnalysisStateSet
Profiling the `ts_query__analyze_patterns` function shows that it
spends a lot of time copying items in its various state sets. These
state sets are kept sorted, and the items are fairly large, so any time
that we insert new entries near the front of the array, a lot of calls
to memcpy must occur.

In advance of more sophisticated rework, one easy win is to hide the
large `AnalysisStateSet` objects behind pointers, so that the size of
each item in the list goes from 68 to 8 bytes, and add an object pool to
reuse allocations. This shows a significant performance improvement for
grammars that have a lot of states in them.
2022-01-10 20:07:14 -08:00
.github/workflows Fix ci.yml format 2021-09-28 18:52:12 -04:00
cli 0.20.2 2021-12-31 17:23:08 -08:00
docs Add link to Protocol Buffers grammar 2022-01-02 21:18:12 +00:00
highlight Bump library versions to 0.20.1 2021-11-21 12:33:12 -08:00
lib Add pointer indirection to AnalysisStateSet 2022-01-10 20:07:14 -08:00
script Remove unnecessary types from binding.rs 2021-12-09 21:02:15 -08:00
tags tags: Remove unused field 2021-12-09 22:39:27 -08:00
test Convert more fixture grammars from JSON to JS 2021-12-30 16:27:02 -08:00
.appveyor.yml Build and test wasm on CI 2019-04-26 14:38:13 -07:00
.gitattributes lib: remove utf8proc dependency (#436) 2019-10-14 11:18:39 -07:00
.gitignore Bump lib tree-sitter dependency versions in loader crate 2021-09-03 13:29:03 -07:00
Cargo.lock 0.20.2 2021-12-31 17:23:08 -08:00
Cargo.toml Move code into cli directory 2019-01-04 16:50:52 -08:00
CONTRIBUTING.md Tweak readmes 2020-05-12 16:16:48 -07:00
LICENSE chore(cli): Add the LICENSE file to the tree-sitter-cli npm package 2021-08-22 03:13:46 +03:00
Makefile Fix compilation warnings (#635) 2020-06-03 12:19:57 -07:00
README.md Add zenodo citation badge to readme 2021-03-18 12:16:03 -07:00
tree-sitter.pc.in Add a simple Makefile-based build system. 2020-04-21 23:49:19 -04:00

tree-sitter

Build Status Build status DOI

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
  • Fast enough to parse on every keystroke in a text editor
  • Robust enough to provide useful results even in the presence of syntax errors
  • Dependency-free so that the runtime library (which is written in pure C) can be embedded in any application