elm-typescript-interop
elm-typescript-interop copied to clipboard
Explore using stil4m/elm-syntax instead of elm-ast
Using https://github.com/stil4m/elm-syntax may potentially address a few problems:
- The
elm-astlibraries have several parsing bugs - The
elm-astlibraries are not planning on upgrading to Elm 0.19 - Using
elm-syntaxmay also help with only parsing modules which are imported somewhere
Here's the original comment suggesting this library: https://github.com/dillonkearns/elm-typescript-interop/issues/15#issuecomment-438448890
Here are some current issues in elm-typescript-interop it could address:
- Performance for large projects https://github.com/dillonkearns/elm-typescript-interop/issues/16
- Ignore unimported modules https://github.com/dillonkearns/elm-typescript-interop/issues/11
- Parsing bugs like https://github.com/dillonkearns/elm-typescript-interop/issues/15 and several others
If #18 is merged, then FYI it will have to be updated if we move away from elm-ast.
I'm throwing in a wild idea:
How about some manual pre-processing of the modules?
In particular, stripping -- comments to alleviate the problems experienced in #15.
Also note https://github.com/andre-dietrich/parser-combinators
I suggested the manual preprocessing in a github issue a while back for the Bogdanp parsing library, but it seems like that one isn't being actively maintained lately (at least the last I checked).
I think the still4m package is the way to go. It will take some time to change things over, though and I don't have much bandwidth at the moment, but I'll go that route when I do it.