mirror of
https://github.com/oxc-project/oxc.git
synced 2026-09-14 19:36:11 +08:00
ca68ea6192
Part of #15180 gql-in-js is the simplest among other xxx-in-js cases. It works by: - splitting the template with `${}`, converting each part into an IR using: - `prettier({ parser:"graphql" })` and `oxc_formatter` respectively - and then interleaving them However, for this to work, two things are essential: - Obtaining a formatted `Doc` from Prettier, rather than just a formatted `string`. - Converting the `Doc` JSON into `oxc_formatter`'s IR. The diffs primarily arise from the implementation of these two. ### TODOs - [x] Implement by Claude - [x] Self review and fix up - [x] Check bench, ecosystem
212 B
212 B