Stream: t-compiler/rust-analyzer

Topic: rust-analyzer public API


Shahar Dawn Or (Mar 09 2021 at 13:29, on Zulip):

I'd like to:

  1. Parse Rust code into AST
  2. Mutate that AST
  3. Get back Rust code, even if not nicely formatted.

I was advised that rust-analyzer is made with this in mind. But where is the API for this, please? I'm not even sure which crate to look into.

matklad (Mar 09 2021 at 13:29, on Zulip):

You need the syntax crate (sorry, didn't have a chance to get back to you on telegram yet :( )

Last update: Jul 29 2021 at 09:45UTC