-
Notifications
You must be signed in to change notification settings - Fork 440
[Parser] Add 'atContextualKeywordPrefixedSyntax' method #3023
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
[Parser] Add 'atContextualKeywordPrefixedSyntax' method #3023
Conversation
There was a problem hiding this 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
Sources/SwiftParser/Statements.swift
Outdated
$0.consumeAnyToken() | ||
return $0.atValidTrailingClosure(flavor: exprFlavor) | ||
} | ||
return isClosure && acceptClosure |
There was a problem hiding this comment.
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.
725db10
to
3c00ba6
Compare
3c00ba6
to
5bf4217
Compare
@swift-ci Please test |
2f77f68
to
2a45ef7
Compare
Just like 'return', 'then' statement should accept operand on the next line.
2a45ef7
to
ebf79c3
Compare
@swift-ci Please test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@swift-ci Please test Windows |
Unified disambiguation method for contextual-keyword prefixed syntax.