Closed chtzvt closed 1 year ago
I don't think this align well with tree-sitter; A few tools (e.g., neovim, emacs, semgrep) rely on a precise tree-sitter API and Concrete syntax trees to work, and the beauty of tree-sitter is that it works consistently for many languages, not just Ruby, so I don't think it makes sense to adopt YARP. Just my 2c.
Background / Motivation
Some exciting developments have occurred in the Ruby language infrastructure & tooling space. In particular, folks at Shopify (especially @kddnewton) have introduced an all-new portable, error-tolerant parser called YARP:
The YARP project is intended to unify Ruby tooling around a standard portable, compatible parser. The YARP and CRuby teams have collaborated closely on the parser's design, and the CRuby team has given their approval to merge YARP as a replacement for MRI's existing parser implementation:
Benefits of YARP
Quotes below are taken from the YARP announcement.
Compatibility
Maintainability
Much of YARP's code is generated from a single YAML configuration file describing Ruby tokens and nodes.
Portability
Standardized AST
Integration / Performance
Error Tolerance
Rust Bindings
At the moment, a draft PR is in progress to add Rust bindings to YARP.