Remix.run Logo
philipallstar 6 hours ago

You might need a bit more than ASTs, as you need code to be human-readable as well as machine-readable. Maybe CSTs?

rs545837 2 hours ago | parent [-]

CSTs are the right call for round-tripping, but isn't that essentially what tree-sitter gives you, a concrete syntax tree that preserves whitespace, comments, and formatting.