News for hackers. Stuff that matters.
Re:Tree Sitter and the Complications of Parsing Languages by lenkite on Wednesday November 24, 2021 @05:12AM (#29328524)
Rust-analyzer uses Salsa - incremental computation library that uses memoization.

https://github.com/rust-analyzer/rust-analyzer/blob/master/d...

Re:Tree Sitter and the Complications of Parsing Languages by zesterer on Wednesday November 24, 2021 @05:22AM (#29328579)
Interesting choice to reply to matklad, one of rust-analyzer's primary authors, to explain how it works.
Re:Tree Sitter and the Complications of Parsing Languages by matklad on Wednesday November 24, 2021 @05:25AM (#29328601)
Nah, it’s a totally valid question: I indeed didn’t clarify where incrementality starts to happen.
Re:Tree Sitter and the Complications of Parsing Languages by lenkite on Wednesday November 24, 2021 @09:38AM (#29330348)
I slapped myself in the face.
Re:Tree Sitter and the Complications of Parsing Languages by matklad on Wednesday November 24, 2021 @05:23AM (#29328590)
Yeah, to clarify, memoization happens after parsing. So for syntax highlighting we have a situation where from-scratch parsing is faster than incremental typechecking.
Re:Tree Sitter and the Complications of Parsing Languages by lenkite on Wednesday November 24, 2021 @09:36AM (#29330319)
Thanks for explaining and making rust-analyzer!