Skip to content

Use NilLiteralExpr in BuildableCollectionNodes #552

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

Conversation

fwcd
Copy link
Member

@fwcd fwcd commented Aug 4, 2022

A small patch that uses NilLiteralExpr inBuildableCollectionNodes instead of generating nil as an identifier.

One minor thing that we might want to figure out is why nil tokens generate a trailing space unlike identifier tokens.

@fwcd fwcd requested a review from ahoppen as a code owner August 4, 2022 15:20
@fwcd
Copy link
Member Author

fwcd commented Aug 4, 2022

@swift-ci please test

@ahoppen
Copy link
Member

ahoppen commented Aug 4, 2022

One minor thing that we might want to figure out is why nil tokens generate a trailing space unlike identifier tokens.

AFAICT that’s because keywords require a trailing space by default. We might want to revisit that for literals.

https://github.com/apple/swift/blob/df2d938604ca19427aeed52d741674013403e645/utils/gyb_syntax_support/Token.py#L44

@fwcd fwcd force-pushed the nil-literal-expr-buildable-collection-nodes branch from a367672 to 6c1fedb Compare August 12, 2022 14:51
@fwcd
Copy link
Member Author

fwcd commented Aug 12, 2022

@swift-ci please test

@fwcd fwcd merged commit 32a6aa4 into swiftlang:main Aug 12, 2022
@fwcd fwcd deleted the nil-literal-expr-buildable-collection-nodes branch August 12, 2022 16:51
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