Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deadEndsToString #4

Closed
girishso opened this issue Apr 18, 2020 · 3 comments
Closed

deadEndsToString #4

girishso opened this issue Apr 18, 2020 · 3 comments

Comments

@girishso
Copy link

Run failed with failed to parse: TODO deadEndsToString

@brandly
Copy link
Owner

brandly commented Apr 18, 2020

hi! does the .elm file have valid syntax? it compiles? if so, could you share the file (or the whole project) with me?

i'm spitting out an error here when elm-syntax fails to parse an Elm file. maybe that repo has a bug.

elm-to-dot/src/Main.elm

Lines 105 to 106 in e098a6a

Err e ->
( model, Native.Log.line <| E.string ("failed to parse: " ++ Parser.deadEndsToString e) )


however, the TODO comes from the official elm/parser via Parser.deadEndsToString. the issue has been open since August 26, 2018.

pull requests have been submitted. @evancz even commented on one, while not actually addressing the PR. it's all very confusing.

i didn't realize this when i used that function. like why is the function even there if it's useless?

tl;dr - maybe your .elm is invalid or maybe elm-syntax has a bug. regardless, elm/parser needs attention.

@brandly
Copy link
Owner

brandly commented Apr 18, 2020

fixed in v0.2.1. you should get something like this now:

$ elm-to-dot src/Main.elm
failed to parse: ExpectingEnd at row:18 col:5

run npm i -g elm-to-dot again to update!

@girishso thanks for letting me know about this!

@brandly
Copy link
Owner

brandly commented Apr 18, 2020

if you think it's failing on valid Elm code, let me know! it's almost certainly a problem with elm-syntax, and i could help track it down or file the issue on that repo. thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants