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

Fix parsing error when there are no parens around = in a type alias declaration #116

Merged
merged 7 commits into from
Mar 25, 2021

Conversation

jfmengels
Copy link
Collaborator

@jfmengels jfmengels commented Mar 25, 2021

There was an issue with parsing type alias declarations when there was no spacing on either side of the = sign.

-- Succeed to parse
type alias A = ()
-- Fail to parse
type alias A= ()
type alias A =()

Example of this happening in an Ellie: https://ellie-app.com/cJJBxZd4gkga1

This is also the case in v8, so we'll need to backport this to master.

@MartinSStewart
Copy link
Collaborator

I looked at all the places "=" shows up and found that it's also incorrect for LetDestructuring. I went ahead and fixed that. It looks like it's also incorrect for destructuringDeclaration in Declaractions.elm but I think this can be left alone because destructuring isn't possible for top level declarations so really that whole function should be removed at some point.

@jfmengels
Copy link
Collaborator Author

Nice 👍
Your changes look good to me. Are you okay with merging this then?

Copy link
Collaborator

@MartinSStewart MartinSStewart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me

@jfmengels jfmengels merged commit b32a8e5 into v7 Mar 25, 2021
@jfmengels jfmengels deleted the type-alias-parsing-error branch March 25, 2021 19:24
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

Successfully merging this pull request may close these issues.

2 participants