Skip to content

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

Merged
merged 3 commits into from
Feb 4, 2020

Conversation

NevinBR
Copy link
Contributor

@NevinBR NevinBR commented Mar 11, 2018

Minor spelling and grammar corrections in the lib/Syntax readme.

@@ -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.
Copy link
Collaborator

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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'.

Copy link
Contributor Author

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”.

@@ -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
Copy link
Collaborator

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.

Copy link
Contributor Author

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.

Copy link
Contributor

@harlanhaskins harlanhaskins Mar 14, 2018

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..."

Copy link
Contributor Author

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.

Copy link
Collaborator

@xwu xwu Mar 14, 2018

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.

Copy link
Contributor Author

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.

@harlanhaskins
Copy link
Contributor

Thanks for looking thoroughly thorough this document!

NevinBR added 2 commits March 14, 2018 14:40
Incorporated suggestions from others.
Added a semicolon to a run-on sentence, and restored the original commas there.
@CodaFi
Copy link
Contributor

CodaFi commented Nov 14, 2019

Will squash this down manually.

Thanks!

@swift-ci please smoke test

@CodaFi
Copy link
Contributor

CodaFi commented Feb 4, 2020

⛵️

@CodaFi CodaFi merged commit 4d64059 into swiftlang:master Feb 4, 2020
@NevinBR NevinBR deleted the patch-1 branch May 9, 2020 23:38
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.

4 participants