Rust grammar for tree-sitter
Find a file
Vanessa 261b20226c
Some checks failed
CI / Test parser (push) Has been cancelled
Lint / lint (push) Has been cancelled
Raw reference/identifier conflict (#288)
* Raw reference/identifier conflict

* Added test

* Regenerate with cli v0.25.10

* Upgrade tree-sitter dependency on node bindings

* Upgrade tree-sitter dependency for Swift

* Unsafe foreign_mod_item and CI updates
2025-10-06 08:16:35 -07:00
.github Raw reference/identifier conflict (#288) 2025-10-06 08:16:35 -07:00
bindings build: update bindings 2024-11-10 00:43:45 -05:00
examples build: update bindings and workflows 2024-04-07 00:00:44 -04:00
queries Update tags.scm (#249) 2024-12-18 20:48:51 -08:00
src Raw reference/identifier conflict (#288) 2025-10-06 08:16:35 -07:00
test/corpus Raw reference/identifier conflict (#288) 2025-10-06 08:16:35 -07:00
.editorconfig build: update bindings 2024-11-10 00:43:45 -05:00
.gitattributes build: update bindings 2024-11-10 00:43:45 -05:00
.gitignore build: update bindings 2024-10-15 04:30:44 +00:00
binding.gyp build: update bindings 2024-09-02 05:16:51 -04:00
Cargo.lock update tree-sitter version in dev-dependencies to make ci pass (#270) 2025-04-01 15:44:03 -07:00
Cargo.toml Include LICENSE (#263) 2025-09-30 15:35:13 -07:00
CMakeLists.txt 0.24.0 2025-04-01 14:02:57 -07:00
eslint.config.mjs build: update bindings 2024-10-15 04:30:44 +00:00
go.mod build: update bindings 2024-11-10 00:43:45 -05:00
go.sum build: update bindings 2024-11-10 00:43:45 -05:00
grammar.js Raw reference/identifier conflict (#288) 2025-10-06 08:16:35 -07:00
LICENSE Init 2017-03-29 19:15:15 +03:00
Makefile 0.24.0 2025-04-01 14:02:57 -07:00
package-lock.json Raw reference/identifier conflict (#288) 2025-10-06 08:16:35 -07:00
package.json Raw reference/identifier conflict (#288) 2025-10-06 08:16:35 -07:00
Package.resolved Raw reference/identifier conflict (#288) 2025-10-06 08:16:35 -07:00
Package.swift Raw reference/identifier conflict (#288) 2025-10-06 08:16:35 -07:00
pyproject.toml 0.24.0 2025-04-01 14:02:57 -07:00
README.md build: update bindings and workflows 2024-04-07 00:00:44 -04:00
setup.py build: update bindings 2024-09-02 05:16:51 -04:00
tree-sitter.json 0.24.0 2025-04-01 14:02:57 -07:00

tree-sitter-rust

CI discord matrix crates npm pypi

Rust grammar for tree-sitter.

Features

  • Speed — When initially parsing a file, tree-sitter-rust takes around two to three times as long as rustc's hand-written parser.

    $ wc -l examples/ast.rs
      2157 examples/ast.rs
    
    $ rustc -Z unpretty=ast-tree -Z time-passes examples/ast.rs | head -n0
      time:   0.002; rss:   55MB ->   60MB (   +5MB)  parse_crate
    
    $ tree-sitter parse examples/ast.rs --quiet --time
      examples/ast.rs    6.48 ms        9908 bytes/ms
    

    But if you edit the file after parsing it, tree-sitter can generally update the previous existing syntax tree to reflect your edit in less than a millisecond, thanks to its incremental parsing system.

References