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

feat!: Remove -> token in favor of => #2177

Merged
merged 3 commits into from
Nov 16, 2024

Conversation

spotandjake
Copy link
Member

This removes the -> support in the compiler as we said we were only going to keep it through v0.6, This is my first change to the parser that changes the way tokens are evaluated, I went through and manually updated the parsers.messages file I dont know if I was meant todo it another way but menhir seemed fine with it :).

One thing I was wondering is maybe instead of fully removing support for -> do we want to still handle lexing it and throw an error in the lexer about it being deprecated for a few versions? I think this behaviour is desirable over the formatter approach as it signifies we dont support the syntax but makes it clear why things broke.

Breaking as we are removing support for ->

@alex-snezhko
Copy link
Member

I think doing a lexer in the error instead makes sense to be helpful to the user

@spotandjake spotandjake force-pushed the spotandjake-remove-thin-arrow branch from 24156b3 to 641022f Compare October 28, 2024 18:41
@spotandjake
Copy link
Member Author

Alright I switched this to throw a DeprecatedToken error in the lexer, I think this behaviour makes sense to keep around for a few versions and we can remove the error if we decide to use -> for something different later.

@ospencer
Copy link
Member

ospencer commented Nov 7, 2024

I don't think the error is necessary. We already had a transition period, and it could have made sense to have a warning for it before dropping support, but as we're at the point that the support is over, we should remove it from the language entirely.

@spotandjake spotandjake force-pushed the spotandjake-remove-thin-arrow branch from 641022f to 243ebd5 Compare November 11, 2024 19:43
@spotandjake
Copy link
Member Author

I don't think the error is necessary. We already had a transition period, and it could have made sense to have a warning for it before dropping support, but as we're at the point that the support is over, we should remove it from the language entirely.

Reverted the error.

@ospencer ospencer added this pull request to the merge queue Nov 15, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 15, 2024
@ospencer ospencer added this pull request to the merge queue Nov 16, 2024
Merged via the queue into grain-lang:main with commit d0038d3 Nov 16, 2024
12 checks passed
@github-actions github-actions bot mentioned this pull request Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants