-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Fixed typos and grammar in lib/Syntax/README.md #15150
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
Conversation
lib/Syntax/README.md
Outdated
@@ -175,7 +175,7 @@ StructDeclSyntaxBuilder Builder; | |||
// We previously parsed a struct keyword, let's tell the builder to use it. | |||
Builder.useStructKeyword(StructKeyword); | |||
|
|||
// Hm, we didn't see an identifier, but saw a left brace. Let's keep going. |
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.
This is fine as written.
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.
The original uses a non-standard variant spelling.
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.
I can take this or leave it. 'Hm' is just as correct as 'Hmm'.
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.
Okay I’m outvoted, we’ll keep it as “Hm”.
lib/Syntax/README.md
Outdated
@@ -163,8 +163,8 @@ struct YourStruct {} | |||
At any point in the building process, you can call `build()` and get a | |||
reasonably formed Syntax node (i.e. with no raw `nullptr`s) using what you've | |||
provided to the builder so far. Anything that you haven't supplied is marked as | |||
*missing*. This is essentially what the parser does so, looking forward to | |||
future adoption, the builders are designed with the parser in mind, with the |
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.
The punctuation here is more correct as written than in the revised version.
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.
I strongly disagree. There needs to be a comma between “does” and “so”.
After that it is more stylistic, and in my view reads better as revised.
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.
How about: "This is essentially what the parser does, so—looking forward to future adoption—the builders are designed with the parser in mind..."
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.
Good thinking, Harlan, I’ll make it use em-dashes.
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.
Commas would be more correct; em dashes are used to offset shifts in thought:
It's often a bad idea to use it where you would use a comma — unless the comma is at a clause boundary and you want to signify a greater break.
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.
Em dashes are used for other things as well, and would be perfectly correct here. However, I have reverted them to commas, and placed a semicolon between “does” and “so”, thus breaking up the run-on sentence after its first independent clause.
Thanks for looking thoroughly thorough this document! |
Incorporated suggestions from others.
Added a semicolon to a run-on sentence, and restored the original commas there.
Will squash this down manually. Thanks! @swift-ci please smoke test |
⛵️ |
Minor spelling and grammar corrections in the lib/Syntax readme.