An incremental parsing system for programming tools https://tree-sitter.github.io
Find a file
Alex Pinkus eaf9b170f1 Don't start with duplicate states in ts_query__analyze_patterns
This change exposes a new `primary_state_ids` field on the `TSLanguage`
struct, and populates it by tracking the first encountered state with a
given `core_id`. (For posterity: the initial change just exposed
`core_id` and deduplicated within `ts_analyze_query`).

With this `primary_state_ids` field in place, the
`ts_query__analyze_patterns` function only needs to populate its
subgraphs with starting states that are _primary_, since non-primary
states behave identically to primary ones. This leads to large savings
across the board, since most states are not primary.
2022-01-16 11:17:47 -08:00
.github/workflows Fix ci.yml format 2021-09-28 18:52:12 -04:00
cli Don't start with duplicate states in ts_query__analyze_patterns 2022-01-16 11:17:47 -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 Don't start with duplicate states in ts_query__analyze_patterns 2022-01-16 11:17:47 -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