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

Enables struct fields punning, i.e. Foo {foo, bar} is syntactic sugar for Foo { foo: foo, bar: bar } #272

Merged
merged 18 commits into from
Apr 22, 2024

Conversation

vitorpy
Copy link
Contributor

@vitorpy vitorpy commented Apr 20, 2024

Closes #253

  • I have updated CHANGELOG.md
  • I have added unit tests to demonstrate the contribution is correctly implemented
  • I have run all the tests locally and no test failure was reported
  • I did not do unrelated and/or undiscussed refactorings

@anton-trunov anton-trunov self-assigned this Apr 21, 2024
@vitorpy vitorpy changed the title Struct-punned Enables struct fields punning, i.e. {foo, bar} is syntactic sugar for { foo: foo, bar: bar } Apr 21, 2024
@vitorpy vitorpy marked this pull request as ready for review April 21, 2024 11:38
@anton-trunov
Copy link
Member

Looks like you go in the right direction. I'd like to have a couple more tests here that are not just grammar tests:

@anton-trunov anton-trunov added this to the v1.3.0 milestone Apr 21, 2024
vitorpy and others added 2 commits April 22, 2024 11:03
Co-authored-by: Anton Trunov <anton.a.trunov@gmail.com>
@vitorpy
Copy link
Contributor Author

vitorpy commented Apr 22, 2024

Will fix conflicts.

@vitorpy
Copy link
Contributor Author

vitorpy commented Apr 22, 2024

Changelog changes don´t look right, looking.

Copy link
Member

@anton-trunov anton-trunov left a comment

Choose a reason for hiding this comment

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

@vitorpy Thanks a lot for contributing yet another nice feature!

@anton-trunov anton-trunov merged commit 8e61206 into tact-lang:main Apr 22, 2024
3 checks passed
@anton-trunov anton-trunov changed the title Enables struct fields punning, i.e. {foo, bar} is syntactic sugar for { foo: foo, bar: bar } Enables struct fields punning, i.e. Foo {foo, bar} is syntactic sugar for Foo { foo: foo, bar: bar } Apr 22, 2024
@vitorpy vitorpy deleted the struct-punned branch April 22, 2024 20:45
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.

Struct fields punning, i.e. {foo, bar} should be syntactic sugar for { foo: foo, bar: bar }
2 participants