This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
Write a tool for helping debug rome_ir #2587
Labels
A-Tooling
Area: our own build, development, and release tooling
good first issue
Good for newcomers
task
A task, an action that needs to be performed
Description
Currently, suppose we want to debug why our formatter generate different result from
prettier
. We need to use rome_playground, copy it, write some corresponding rust code, debug the rust rome_ir code, and finally, get expected rust rome_ir code that matches prettier, then adjustrome_js_formatter
until it generates expected result same as prettier.I found that
rome_ir
has some relation with our craterome_formatter
, e.g.:Assume we have
rome_ir
below:We could convert
rome_ir
above to rust code userome_formatter
:Although,
SyntaxTokenSlice
should be more efficient thantoken
, in this scenario performance is not a big deal.We want to use some tool to help us convert
rome_ir
in the playground to rust code, I split this task to two steps:rome_ir
to ASTThe text was updated successfully, but these errors were encountered: