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

Pointer Reform - change prefix deref syntax to postfix deref syntax #1019

Merged
merged 11 commits into from May 18, 2018

Conversation

andrewrk
Copy link
Member

This is the first step towards #770.

This changes *x syntax to x.*. This frees up * as a prefix operator so that we can change the pointer type syntax in a future patch.

Instead of manually going through and making these changes in the zig codebase, or using something like sed, I worked on zig fmt to the point where it can make the modifications automatically.

So if you want to have zig fmt do the work for you, build this branch and use the stage 2 compiler:
https://github.com/zig-lang/zig/tree/zig-fmt-pointer-reform

zig fmt is still young, so be ready to file bugs. See also #1003. Even so, I think this is likely to solve 99% of your upgrade to the new syntax.

@andrewrk andrewrk added the breaking Implementing this issue could cause existing code to no longer compile or have different behavior. label May 18, 2018
@andrewrk andrewrk merged commit 83a7809 into master May 18, 2018
@andrewrk andrewrk deleted the pointer-reform branch May 18, 2018 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Implementing this issue could cause existing code to no longer compile or have different behavior.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant