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

Go 1.20 update #3634

Merged
merged 7 commits into from
Jul 29, 2023
Merged

Go 1.20 update #3634

merged 7 commits into from
Jul 29, 2023

Conversation

codeFather2
Copy link
Contributor

@codeFather2 codeFather2 commented Jul 27, 2023

This request updates the Go grammar, adding support for the new 1.20.* syntax.
Actual Go spec - Go/ref/spec

What's New

  • Generic types, interfaces and function
  • Interface constraints
  • Underlying type operation

@kaby76
Copy link
Contributor

kaby76 commented Jul 28, 2023

This is great. Thanks for updating this grammar!

I'm not sure what should be done with these unused symbols/rules. Should the grammar be adjusted to be closer to the Spec or remove the rules?

$ bash /c/Users/Kenne/Documents/GitHub/g4-checks/unused.sh
No arguments were provided.
Finding unused parser symbols in grammars...
./desc.xml
GoParser.g4:L132: emptyStmt: EOS | SEMI;
                  ^
GoParser.g4:L373: receiverType: type_;
                  ^

@codeFather2
Copy link
Contributor Author

@kaby76 I think it's best to remove unused rules. The receiverType rule is just a dummy layer for the next rule, and the empty statement doesn't really do anything because EOS and SEMI are covered by statementList.

@teverett
Copy link
Member

@codeFather2 thanks!

@teverett teverett merged commit 3f8fed9 into antlr:master Jul 29, 2023
38 checks passed
@codeFather2 codeFather2 deleted the go-1.20-update branch July 29, 2023 14:15
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.

3 participants