Skip to content

[reference-binding] Parser support for inout bindings #64012

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

Merged
merged 5 commits into from
Mar 2, 2023

Conversation

gottesmm
Copy link
Contributor

@gottesmm gottesmm commented Mar 1, 2023

Just the initial part.

@gottesmm gottesmm marked this pull request as ready for review March 1, 2023 22:24
@gottesmm
Copy link
Contributor Author

gottesmm commented Mar 1, 2023

swiftlang/swift-syntax#1363

@swift-ci smoke test

gottesmm added 4 commits March 1, 2023 20:48
…instead of a bool to mean a let.

I am going to be adding more VarDecl::Introducers so this is a small nice
cleanup that is cut off the larger patch.
…rnBindingState.

This cleans up the parser code a little bit around here and will make it easier
for me to add inout.
…ypes.

This was exposed by:

decl/enum/enumtest.swift

The problem here is that we are now allowing for inout to be the start of a
swift decl. This means that if one defines an enum case with a inout parameter,
the parser gets confused and doesnt think it is part of the type. I worked
around this by changing canParseTupleTypeBody to say that an inout binding
cannot be parsed as part of a tuple type. This fits already with how we want to
model this.
@gottesmm gottesmm force-pushed the reference-bindings-part-1 branch from 0274f6b to 1459d25 Compare March 2, 2023 04:50
@gottesmm
Copy link
Contributor Author

gottesmm commented Mar 2, 2023

swiftlang/swift-syntax#1363

@swift-ci smoke test

@gottesmm
Copy link
Contributor Author

gottesmm commented Mar 2, 2023

swiftlang/swift-syntax#1363

@swift-ci smoke test

1 similar comment
@gottesmm
Copy link
Contributor Author

gottesmm commented Mar 2, 2023

swiftlang/swift-syntax#1363

@swift-ci smoke test

@gottesmm gottesmm merged commit 7c58752 into swiftlang:main Mar 2, 2023
@gottesmm gottesmm deleted the reference-bindings-part-1 branch March 2, 2023 23:16
@gottesmm
Copy link
Contributor Author

gottesmm commented Mar 5, 2023

This is rdar://106262176

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.

1 participant