Skip to content

Commit 880698e

Browse files
authored
Fixed typos and grammar in README.md
1 parent c26f40b commit 880698e

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

lib/Syntax/README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ representation of source, and facilities for *structured editing*.
1111
What is structured editing? It's an editing strategy that is keenly aware of the
1212
*structure* of source code, not necessarily its *representation* (i.e.
1313
characters or bytes). This can be achieved at different granularities: replacing
14-
an identifier, changing a call to global function to a method call, or indenting
14+
an identifier, changing a global function call to a method call, or indenting
1515
and formatting an entire source file based on declarative rules. These kinds of
1616
diverse operations are critical to the Swift Migrator, which is the immediate
1717
client for this library, now developed in the open. Along with that, the library
@@ -163,8 +163,8 @@ struct YourStruct {}
163163
At any point in the building process, you can call `build()` and get a
164164
reasonably formed Syntax node (i.e. with no raw `nullptr`s) using what you've
165165
provided to the builder so far. Anything that you haven't supplied is marked as
166-
*missing*. This is essentially what the parser does so, looking forward to
167-
future adoption, the builders are designed with the parser in mind, with the
166+
*missing*. This is essentially what the parser does, so looking forward to
167+
future adoption the builders are designed with the parser in mind, with the
168168
hope that we can better specify recovery behavior and incremental (re-)parsing.
169169

170170
**Example**
@@ -175,7 +175,7 @@ StructDeclSyntaxBuilder Builder;
175175
// We previously parsed a struct keyword, let's tell the builder to use it.
176176
Builder.useStructKeyword(StructKeyword);
177177

178-
// Hm, we didn't see an identifier, but saw a left brace. Let's keep going.
178+
// Hmm, we didn't see an identifier, but saw a left brace. Let's keep going.
179179
Builder.useLeftBrace(ParsedLeftBrace)
180180

181181
// No members of the struct; we saw a right brace.
@@ -387,7 +387,8 @@ Beyond this, `SyntaxData` nodes have *no significant public API*.
387387
388388
- `SyntaxData` are immutable.
389389
However, they may mutate themselves in order to implement lazy instantiation
390-
of children and caching. That caching operation transparent and thread-safe.
390+
of children and caching. That caching operation is transparent and
391+
thread-safe.
391392
- `SyntaxData` have identity, i.e. they can be compared with "pointer equality".
392393
- `SyntaxData` are implementation detail have no public API.
393394
@@ -428,7 +429,7 @@ auto ReturnKW = SyntaxFactory::makeReturnKeyword({}, Trivia::spaces(1));
428429
auto Return = SyntaxFactory::makeReturnStmt(ReturnKW, Integer,
429430
/*Semicolon=*/ None);
430431
431-
auto RightBrace = SyntaxFactory::makeLeftBraceToken({}, {});
432+
auto RightBrace = SyntaxFactory::makeRightBraceToken({}, {});
432433
433434
auto Statements = SyntaxFactory::makeBlankStmtList()
434435
.addStmt(Return);

0 commit comments

Comments
 (0)