TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Rust-sitter: Define your entire tree-sitter grammar in Rust code

127 点作者 sbt567大约 2 年前

5 条评论

hardwaregeek大约 2 年前
I&#x27;m super excited about the ability to get good quality bindings to tree-sitter! Tree-sitter is a very cool project but it needs a little love in a few regards. A better WebAssembly story, good bindings, and the ability to construct trees synthetically (to facilitate code generation) would make it a really remarkable tool.<p>As for rust-sitter, it&#x27;s a very promising direction. The error story needs a little work. I found it pretty hard to debug issues with my grammar. And it is slightly annoying having all those extra () fields in the struct, but that&#x27;s really a minor complaint.
评论 #34906899 未加载
shilangyu大约 2 年前
Are there any benefits for users that tree-sitter is used under the hood? Can we benefit from the killer features of tree-sitter? Namely incremental parsing, fallible parsing, lossless syntax tree, or being embeddable into editors supporting tree-sitter syntax highlighting?
评论 #34899029 未加载
shadaj大约 2 年前
Hi! Rust Sitter creator here, happy to answer any questions about the project and where it&#x27;s going!
评论 #34898893 未加载
评论 #34903349 未加载
IshKebab大约 2 年前
What&#x27;s the advantage of defining the grammar in Rust? JavaScript is admittedly an odd choice, but it works, there are a ton of grammars out there and it isn&#x27;t needed at runtime.<p>Changing the <i>runtime</i> to Rust is very useful though - I&#x27;ve wanted that for a long time to make WASM and cross compilation easier.
评论 #34902768 未加载
dlahoda大约 2 年前
does it support callbacks to handle semantic space languages like haskell and python?
评论 #34906910 未加载