Skip to content

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Mar 19, 2025

Unified disambiguation method for contextual-keyword prefixed syntax.

Copy link
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

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

Thank you. Much cleaner than the old rules

$0.consumeAnyToken()
return $0.atValidTrailingClosure(flavor: exprFlavor)
}
return isClosure && acceptClosure
Copy link
Member

Choose a reason for hiding this comment

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

Can we avoid the isClosure check if acceptClosure is false?

Unified disambiguation method for contextual-keyword prefixed syntax.
@rintaro rintaro force-pushed the parser-contetual-keyword-prefixed branch 2 times, most recently from 725db10 to 3c00ba6 Compare March 20, 2025 11:59
@rintaro rintaro force-pushed the parser-contetual-keyword-prefixed branch from 3c00ba6 to 5bf4217 Compare March 20, 2025 16:39
@rintaro
Copy link
Member Author

rintaro commented Mar 20, 2025

@swift-ci Please test

@rintaro rintaro force-pushed the parser-contetual-keyword-prefixed branch from 2f77f68 to 2a45ef7 Compare March 21, 2025 17:03
Just like 'return', 'then' statement should accept operand on the next
line.
@rintaro rintaro force-pushed the parser-contetual-keyword-prefixed branch from 2a45ef7 to ebf79c3 Compare March 21, 2025 17:12
@rintaro
Copy link
Member Author

rintaro commented Mar 21, 2025

@swift-ci Please test

@rintaro rintaro marked this pull request as ready for review March 21, 2025 17:17
@rintaro rintaro requested a review from bnbarham as a code owner March 21, 2025 17:17
Copy link
Contributor

@hamishknight hamishknight left a comment

Choose a reason for hiding this comment

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

Thanks!

@rintaro
Copy link
Member Author

rintaro commented Mar 21, 2025

@swift-ci Please test Windows

@rintaro rintaro merged commit 5aa5558 into swiftlang:main Mar 21, 2025
24 checks passed
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