tree-sitter
An incremental parsing system for programming tools
File Explorer
Download Latest Version (.zip)- config.toml
- action.yml
- bug_report.yml
- config.yml
- feature_request.yml
- close_spam.js
- close_unresponsive.js
- remove_response_label.js
- wasm_stdlib.js
- backport.yml
- bindgen.yml
- build.yml
- ci.yml
- crate_versions.yml
- docs.yml
- nvim_ts.yml
- release.yml
- response.yml
- reviewers_remove.yml
- sanitize.yml
- spam.yml
- wasm_exports.yml
- wasm_stdlib.yml
- cliff.toml
- dependabot.yml
- FUNDING.yml
- pull_request_template.md
- settings.json
- benchmark.rs
- .gitignore
- index.js
- package-lock.json
- package.json
- .gitignore
- cli.js
- dsl.d.ts
- install.js
- package-lock.json
- package.json
- allocations.rs
- corpus_test.rs
- edits.rs
- random.rs
- scope_sequence.rs
- .editorconfig
- __init__.py
- __init__.pyi
- _cargo.toml
- binding.go
- binding.gyp
- binding.java
- binding_test.go
- binding_test.js
- build.rs
- build.zig
- build.zig.zon
- cmakelists.cmake
- gitattributes
- gitignore
- go.mod
- grammar.js
- index.d.ts
- index.js
- js-binding.cc
- lib.rs
- makefile
- package.json
- package.swift
- PARSER_NAME.h
- PARSER_NAME.pc.in
- pom.xml
- py-binding.c
- pyproject.toml
- root.zig
- setup.py
- test.java
- test.zig
- test_binding.py
- tests.swift
- dirs.rs
- edits.rs
- fixtures.rs
- query_helpers.rs
- lib.rs
- Cargo.toml
- async_boundary_test.rs
- corpus_test.rs
- detect_language.rs
- helpers.rs
- highlight_test.rs
- language_test.rs
- node_test.rs
- parser_test.rs
- pathological_test.rs
- query_test.rs
- tags_test.rs
- test_highlight_test.rs
- test_tags_test.rs
- text_provider_test.rs
- tree_test.rs
- wasm_language_test.rs
- fuzz.rs
- highlight.rs
- init.rs
- input.rs
- logger.rs
- main.rs
- paint.rs
- parse.rs
- playground.html
- playground.rs
- query.rs
- query_testing.rs
- tags.rs
- test.rs
- test_highlight.rs
- test_tags.rs
- tests.rs
- tree_sitter_cli.rs
- util.rs
- version.rs
- wasm.rs
- build.rs
- Cargo.toml
- LICENSE
- package.nix
- README.md
- tree_sitter_config.rs
- Cargo.toml
- LICENSE
- README.md
- build_lex_table.rs
- build_parse_table.rs
- coincident_tokens.rs
- item.rs
- item_set_builder.rs
- minimize_parse_table.rs
- token_conflicts.rs
- expand_repeats.rs
- expand_tokens.rs
- extract_default_aliases.rs
- extract_tokens.rs
- flatten_grammar.rs
- intern_symbols.rs
- pattern.rs
- process_inlines.rs
- alloc.h
- array.h
- bitvec.rs
- build_tables.rs
- dedup.rs
- dsl.js
- generate.rs
- grammars.rs
- nfa.rs
- node_types.rs
- parse_grammar.rs
- parser.h.inc
- prepare_grammar.rs
- quickjs.rs
- render.rs
- rules.rs
- strpool.rs
- tables.rs
- Cargo.toml
- LICENSE
- README.md
- highlight.h
- c_lib.rs
- highlight.rs
- Cargo.toml
- LICENSE
- README.md
- language.rs
- assert.h
- ctype.h
- endian.h
- inttypes.h
- stdint.h
- stdio.h
- stdlib.h
- string.h
- wchar.h
- wctype.h
- README.md
- stdio.c
- stdlib.c
- string.c
- build.rs
- Cargo.toml
- LICENSE
- README.md
- loader.rs
- binaryen-version
- build.rs
- Cargo.toml
- emscripten-version
- LICENSE
- README.md
- wasi-sdk-version
- tags.h
- c_lib.rs
- tags.rs
- Cargo.toml
- LICENSE
- README.md
- benchmark.rs
- build_wasm.rs
- bump.rs
- check_wasm_exports.rs
- clippy.rs
- embed_sources.rs
- fetch.rs
- generate.rs
- main.rs
- test.rs
- test_schema.rs
- upgrade_wasmtime.rs
- Cargo.toml
- mdbook-admonish.css
- playground.css
- favicon-16x16.png
- favicon-32x32.png
- tree-sitter-small.png
- playground.js
- config.schema.json
- grammar.schema.json
- node-types.schema.json
- test-summary.schema.json
- build.md
- complete.md
- dump-languages.md
- fuzz.md
- generate.md
- highlight.md
- index.md
- init-config.md
- init.md
- parse.md
- playground.md
- query.md
- tags.md
- test.md
- version.md
- 1-getting-started.md
- 2-the-grammar-dsl.md
- 3-writing-the-grammar.md
- 4-external-scanners.md
- 5-writing-tests.md
- 6-publishing.md
- index.md
- 1-syntax.md
- 2-operators.md
- 3-predicates-and-directives.md
- 4-api.md
- index.md
- 1-getting-started.md
- 2-basic-parsing.md
- 3-advanced-parsing.md
- 4-walking-trees.md
- 6-static-node-types.md
- 7-abi-versions.md
- index.md
- 3-syntax-highlighting.md
- 4-code-navigation.md
- 5-implementation.md
- 6-contributing.md
- 7-playground.md
- index.md
- SUMMARY.md
- favicon.png
- .gitignore
- book.toml
- package.nix
- bindings.rs
- build.rs
- ffi.rs
- lib.rs
- README.md
- util.rs
- wasm_allocator.rs
- wasm_language.rs
- exports.txt
- imports.js
- prefix.js
- tree-sitter.c
- web-tree-sitter.d.ts
- build.js
- check-artifacts-fresh.ts
- generate-dts.js
- bindings.ts
- constants.ts
- edit.ts
- finalization_registry.ts
- index.ts
- language.ts
- lookahead_iterator.ts
- marshal.ts
- node.ts
- parser.ts
- query.ts
- tree.ts
- tree_cursor.ts
- edit.test.ts
- helper.ts
- language.test.ts
- memory.test.ts
- memory.ts
- memory_unsupported.test.ts
- node.test.ts
- parser.test.ts
- query.test.ts
- tree.test.ts
- .gitattributes
- .gitignore
- CONTRIBUTING.md
- eslint.config.mjs
- package-lock.json
- package.json
- package.nix
- README.md
- tsconfig.json
- vitest.config.ts
- wasm-test-grammars.nix
- api.h
- table_entry.py
- tree_sitter_types.py
- ts_array.py
- ts_tree.py
- endian.h
- ICU_SHA
- LICENSE
- ptypes.h
- README.md
- umachine.h
- urename.h
- utf.h
- utf16.h
- utf8.h
- alpha.h
- casemap.h
- isblank.c
- iswalnum.c
- iswalpha.c
- iswblank.c
- iswdigit.c
- iswlower.c
- iswpunct.c
- iswspace.c
- iswupper.c
- iswxdigit.c
- punct.h
- towctrans.c
- memchr.c
- memcmp.c
- memcpy.c
- memmove.c
- memset.c
- stpncpy.c
- strchr.c
- strchrnul.c
- strcmp.c
- strlen.c
- strncat.c
- strncmp.c
- strncpy.c
- wcschr.c
- wcslen.c
- LICENSE
- README.md
- external_scanner_allocator.c
- external_scanner_stdlib.h
- imports.txt
- libc.c
- README.md
- stdio.c
- alloc.c
- alloc.h
- array.h
- atomic.h
- error_costs.h
- get_changed_ranges.c
- get_changed_ranges.h
- host.h
- language.c
- language.h
- length.h
- lexer.c
- lexer.h
- lib.c
- node.c
- parser.c
- parser.h
- point.c
- point.h
- query.c
- reduce_action.h
- reusable_node.h
- stack.c
- stack.h
- subtree.c
- subtree.h
- tree.c
- tree.h
- tree_cursor.c
- tree_cursor.h
- ts_assert.h
- unicode.h
- wasm_store.c
- wasm_store.h
- .ccls
- Cargo.toml
- LICENSE
- package.nix
- README.md
- tree-sitter.pc.in
- c_errors.txt
- javascript_errors.txt
- json_errors.txt
- python_errors.txt
- readme.md
- ruby_errors.txt
- .gitkeep
- rust_wasm_web.rs
- .gitignore
- Cargo.lock
- Cargo.toml
- README.md
- run.mjs
- worker.mjs
- readme.md
- ruby_templates.txt
- corpus.txt
- grammar.js
- corpus.txt
- grammar.js
- corpus.txt
- grammar.js
- corpus.txt
- grammar.js
- corpus.txt
- grammar.js
- corpus.txt
- grammar.js
- corpus.txt
- grammar.js
- corpus.txt
- grammar.js
- corpus.txt
- grammar.js
- expected_error.txt
- grammar.js
- corpus.txt
- grammar.js
- corpus.txt
- grammar.js
- corpus.txt
- grammar.js
- expected_error.txt
- grammar.js
- expected_error.txt
- grammar.js
- expected_error.txt
- grammar.js
- corpus.txt
- grammar.js
- scanner.c
- corpus.txt
- grammar.js
- readme.md
- corpus.txt
- grammar.js
- scanner.c
- corpus.txt
- grammar.js
- scanner.c
- expected_error.txt
- grammar.js
- corpus.txt
- grammar.js
- readme.md
- scanner.c
- corpus.txt
- grammar.js
- scanner.c
- corpus.txt
- grammar.js
- scanner.c
- corpus.txt
- grammar.js
- scanner.c
- corpus.txt
- grammar.js
- scanner.c
- corpus.txt
- grammar.js
- README.md
- scanner.c
- corpus.txt
- grammar.js
- corpus.txt
- grammar.js
- corpus.txt
- grammar.js
- scanner.c
- corpus.txt
- grammar.js
- scanner.c
- corpus.txt
- grammar.js
- expected_error.txt
- grammar.js
- corpus.txt
- grammar.js
- corpus.txt
- grammar.js
- readme.md
- corpus.txt
- grammar.js
- readme.md
- scanner.c
- expected_error.txt
- grammar.js
- corpus.txt
- grammar.js
- corpus.txt
- grammar.js
- readme.md
- corpus.txt
- grammar.js
- readme.txt
- corpus.txt
- grammar.js
- readme.md
- corpus.txt
- grammar.js
- readme.md
- corpus.txt
- grammar.js
- expected_error.txt
- grammar.js
- readme.txt
- expected_error.txt
- grammar.js
- readme.md
- corpus.txt
- grammar.js
- readme.md
- corpus.txt
- grammar.js
- readme.md
- corpus.txt
- grammar.js
- corpus.txt
- grammar.js
- readme.md
- corpus.txt
- grammar.js
- corpus.txt
- grammar.js
- corpus.txt
- grammar.js
- corpus.txt
- grammar.js
- expected_error.txt
- grammar.js
- corpus.txt
- grammar.js
- corpus.txt
- grammar.js
- readme.md
- corpus.txt
- grammar.js
- scanner.c
- corpus.txt
- grammar.js
- scanner.c
- corpus.txt
- grammar.js
- scanner.c
- corpus.txt
- grammar.js
- scanner.c
- readme.md
- fixtures.json
- .dockerignore
- .editorconfig
- .envrc
- .gitattributes
- .gitignore
- .taplo.toml
- build.zig
- build.zig.zon
- Cargo.lock
- Cargo.toml
- CMakeLists.txt
- CONTRIBUTING.md
- Dockerfile
- flake.lock
- flake.nix
- FUNDING.json
- LICENSE
- Makefile
- README.md
# Installation Guide
git clone https://github.com/tree-sitter/tree-sitter
Downloads the entire project code from GitHub to your computer.
cd tree-sitter
Moves into the project folder you just downloaded.
2. Docker
Easy Recommended- Git Needed to download the project code from GitHub.
- Docker Desktop Needed to build and run containers. Install it and keep it running in the background.
docker build -t tree-sitter .
Builds a runnable image based on the Dockerfile.
docker run -p 8080:80 tree-sitter
Runs the built image as an actual container.
3. CMake
Mediummkdir build && cd build
Creates a folder to hold the build output and moves into it.
cmake ..
Analyzes the source code and generates build configuration files (must be run inside the build folder).
make
Compiles the code based on the generated build configuration to produce an executable.
4. Node.js
Easycd crates/cli/eslint
This project's files live in a subfolder, so move into it first.
npm install
Downloads and installs the libraries listed in package.json.
npm start
Starts the development/run server.
5. Rust
Medium- Git Needed to download the project code from GitHub.
- Rust (rustup) Installing via rustup also installs cargo.
cargo build --release
Compiles the Rust project.
cargo run
Builds and then immediately runs the program.
6. Make
Medium- Git Needed to download the project code from GitHub.
- Make Usually pre-installed on Linux/macOS. On Windows, install separately (e.g. via MSYS2 or WSL).
make
Compiles the code based on the generated build configuration to produce an executable.
