Open xeho91 opened 2 months ago
Alright, since #90 did not work as expected, I gave this another try. This time by modifying esrap
. You can find my POC here: https://github.com/Rich-Harris/esrap/pull/13
When you have downloaded both repos (this one and esrap
) in the same directory, you can link them together with this command:
pnpm link ../esrap # executed from your `svelte-ast-print` working directory
After that make sure to remove the relevant .fails
from the tests (expect #92) and run pnpm test
as usually. This makes all relevant tests succeed, with some minor stylistic differences.
At this point the PR is still a POC, but I'm way more confident that we will succeed with this than with #90. There is still tons to be done, but it should be a good starting point.
Blockers
esrap
does not support TypeScript AST nodes - attempting to see if maintainers are interested in expanding support for TypeScript - https://github.com/Rich-Harris/esrap/issues/10