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

chore(compiler)!: Disallow end-of-line before => #1178

Merged
merged 2 commits into from
Apr 15, 2022

Conversation

phated
Copy link
Member

@phated phated commented Mar 23, 2022

This removes support for newlines before =>. This came up while I was trying to work on #1113 with @ospencer. We don't allow newlines before ->, so menhir got really mad when I switched them to => and Oscar said it would be really hard to resolve.

I started typing out examples of eol before arrow and they looked really terrible:

let a =
  () => 1
match (a) {
    x
      => 2
}

It seems easiest to just remove support for eol before an arrow. I hope y'all agree.

(Is it a chore? Who knows 🤷 )

@phated phated requested a review from a team March 23, 2022 04:12
@phated
Copy link
Member Author

phated commented Mar 23, 2022

I need @ospencer to look at the messages file because I updated it and it seems that it might have been out-of-date from other changes, because it changed a ton.

Copy link
Member

@ospencer ospencer left a comment

Choose a reason for hiding this comment

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

There's a couple of minor things that changed, but no big deal. It's only comments, so there's nothing to worry about. Pretty much any change to the parser will renumber many of the states.

Copy link
Member

@marcusroberts marcusroberts left a comment

Choose a reason for hiding this comment

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

Looks good!

@jozanza jozanza self-requested a review April 14, 2022 15:58
@phated phated merged commit 8261e73 into main Apr 15, 2022
@phated phated deleted the phated/remove-eols-before-arrow branch April 15, 2022 00:53
@github-actions github-actions bot mentioned this pull request Apr 15, 2022
@github-actions github-actions bot mentioned this pull request May 16, 2022
@github-actions github-actions bot mentioned this pull request May 31, 2022
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.

4 participants