All Projects → tree-sitter → tree-sitter-rust

tree-sitter / tree-sitter-rust

Licence: MIT license
Rust grammar for tree-sitter

Programming Languages

javascript
184084 projects - #8 most used programming language
scheme
763 projects
rust
11053 projects
shell
77523 projects
swift
15916 projects
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to tree-sitter-rust

tree-sitter-tlaplus
A tree-sitter grammar for TLA+
Stars: ✭ 31 (-84.42%)
Mutual labels:  tree-sitter
tree-sitter-vue
Vue grammar for tree-sitter
Stars: ✭ 38 (-80.9%)
Mutual labels:  tree-sitter
tree-sitter-kotlin
Kotlin grammar for Tree-Sitter
Stars: ✭ 35 (-82.41%)
Mutual labels:  tree-sitter
tree-sitter-markdown
A markdown grammar for tree-sitter
Stars: ✭ 168 (-15.58%)
Mutual labels:  tree-sitter
canonix
Experiment in Nix formatting
Stars: ✭ 18 (-90.95%)
Mutual labels:  tree-sitter
tree-edit
🌲 Structural editing in Emacs for any™ language!
Stars: ✭ 211 (+6.03%)
Mutual labels:  tree-sitter
SwiftTreeSitter
Swift wrappers for the tree-sitter incremental parsing system
Stars: ✭ 116 (-41.71%)
Mutual labels:  tree-sitter
tree-sitter-php
PHP grammar for tree-sitter
Stars: ✭ 83 (-58.29%)
Mutual labels:  tree-sitter
tree-sitter-clojure
No description or website provided.
Stars: ✭ 71 (-64.32%)
Mutual labels:  tree-sitter
tree-sitter-yaml
YAML grammar for tree-sitter
Stars: ✭ 29 (-85.43%)
Mutual labels:  tree-sitter
ruby-tree-sitter
Ruby bindings to tree-sitter
Stars: ✭ 48 (-75.88%)
Mutual labels:  tree-sitter
tree-sitter-verilog
Verilog grammar for tree-sitter
Stars: ✭ 49 (-75.38%)
Mutual labels:  tree-sitter
tree-sitter-rescript
ReScript parser for Tree-Sitter
Stars: ✭ 20 (-89.95%)
Mutual labels:  tree-sitter
rust-tree-sitter
Rust bindings to Tree-sitter
Stars: ✭ 29 (-85.43%)
Mutual labels:  tree-sitter
difftastic
a syntax-aware diff 🟥🟩
Stars: ✭ 1,701 (+754.77%)
Mutual labels:  tree-sitter
tree-sitter-toml
TOML grammar for tree-sitter
Stars: ✭ 23 (-88.44%)
Mutual labels:  tree-sitter
tree-sitter-sql
SQL syntax highlighting for tree-sitter
Stars: ✭ 33 (-83.42%)
Mutual labels:  tree-sitter
tree-sitter.el
An Emacs dynamic module exposing tree-sitter.
Stars: ✭ 59 (-70.35%)
Mutual labels:  tree-sitter
Tree Sitter
An incremental parsing system for programming tools
Stars: ✭ 7,083 (+3459.3%)
Mutual labels:  tree-sitter
spellsitter.nvim
Treesitter powered spellchecker
Stars: ✭ 251 (+26.13%)
Mutual labels:  tree-sitter

tree-sitter-rust

Build/test

Rust grammar for tree-sitter

Features

  • Speed - When initially parsing a file, tree-sitter-rust takes around twice as long as Rustc's hand-coded parser.

    $ wc -l examples/ast.rs
      2157 examples/ast.rs
    
    $ rustc -Z ast-json-noexpand -Z time-passes examples/ast.rs | head -n1
      time: 0.007	parsing # (7 ms)
    
    $ tree-sitter parse examples/ast.rs --quiet --time
      examples/ast.rs	16 ms

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

References

  • The Rust Grammar Reference - The grammar reference provides chapters that formally define the language grammar.
  • The Rust Reference - While Rust does not have a specification, the reference tries to describe its working in detail. It tends to be out of date.
  • Keywords and Operators and Symbols.
  • Archive of the outdated Syntax Index that contains examples of all syntax in Rust cross-referenced with the section of The Book that describes it.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].