Replies: 1 comment 1 reply
-
While I see what good this would bring to the table, I doubt that it could work in practice. A common AST model would introduce an interdependency between Esprima and Acornima, which would create new problems that both parsers would need to deal with. Some gotchas off the top of my head:
Anyway, I don't want to kill the idea immediately, as it's a nice one fundamentally. However, to make it a realistic one, we'd need to standardize the AST model (beyond the EStree spec, as it doesn't specify some details and C#-specific aspects) and would also need someone who takes care of the Esprima side. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Just an idea. What if there were a (source generator) NuGet package that would hold just the EStree models so that both Esprima and Acornima could use the same models? As ESTree is a spec the models should be quite interchangeable between the parsers too. With source generator project there would be no new dependency to carry, but the sources would be part of the main library.
Would make switching between the two quite easy, even though Esprima's future doesn't look that bright with this new competitor in town 😉
Beta Was this translation helpful? Give feedback.
All reactions