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

[SR-13716] Documentation Issue: Lexical Structure - Whitespace and Comments #56113

Open
swift-ci opened this issue Oct 9, 2020 · 2 comments
Open

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Oct 9, 2020

Previous ID SR-13716
Radar rdar://problem/70298068
Original Reporter smartdog (JIRA User)
Type Improvement
Additional Detail from JIRA
Votes 0
Component/s
Labels Improvement, Documentation
Assignee None
Priority Medium

md5: 08765d1b3b6953aa5c103288fb05114d

Issue Description:

Description of Problem:
Documentation Issue: Lexical Structure - Whitespace and Comments section:
first sentence should add "binary"
Link to Lexical Structure - Whitespace and Comments

Expected to see:
Whitespace has two uses: to separate tokens in the source file and to help determine whether an operator is a prefix, postfix, or a binary (see Operators), but is otherwise ignored.
Actually observed:
Whitespace has two uses: to separate tokens in the source file and to help determine whether an operator is a prefix or postfix (see Operators), but is otherwise ignored.

Evidence:
Link Lexical Structure - Operators
The six paragraph after the "Note" states:
"The whitespace around an operator is used to determine whether an operator is used as a prefix operator, a postfix operator, or a binary operator. This behavior is summarized in the following rules:"

and the first rule states:

if an operator has whitespace around both sides or around neither side, it’s treated as a binary operator. As an example, the +++ operator in a+++b and a +++ b is treated as a binary operator"

A description of the environment that reproduces the problem.
This issue happens is all Swift Documentation.

I therefore submit the first sentence of the Lexical Structure - Whitespace and Comments should add binary.

@typesanitizer
Copy link

I think the correct terminology here ought to be "infix", not "binary", since the other examples are about fixity and not arity.

@swift-ci create

@swift-ci
Copy link
Collaborator Author

Comment by Robert DiBlasi (JIRA)

@varun Gandhi:

I believe you are correct.

I believe the sentence still needs to be changed.

Therefore, I submit the first sentence of Lexical Structure - Whitespace and Comments add infix.

Thank you Varun Gandie for your astute observation.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants