@@ -11,7 +11,7 @@ representation of source, and facilities for *structured editing*.
11
11
What is structured editing? It's an editing strategy that is keenly aware of the
12
12
* structure* of source code, not necessarily its * representation* (i.e.
13
13
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
15
15
and formatting an entire source file based on declarative rules. These kinds of
16
16
diverse operations are critical to the Swift Migrator, which is the immediate
17
17
client for this library, now developed in the open. Along with that, the library
@@ -163,8 +163,8 @@ struct YourStruct {}
163
163
At any point in the building process, you can call ` build() ` and get a
164
164
reasonably formed Syntax node (i.e. with no raw ` nullptr ` s) using what you've
165
165
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
168
168
hope that we can better specify recovery behavior and incremental (re-)parsing.
169
169
170
170
** Example**
@@ -175,7 +175,7 @@ StructDeclSyntaxBuilder Builder;
175
175
// We previously parsed a struct keyword, let's tell the builder to use it.
176
176
Builder.useStructKeyword(StructKeyword);
177
177
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.
179
179
Builder.useLeftBrace(ParsedLeftBrace)
180
180
181
181
// No members of the struct; we saw a right brace.
@@ -387,7 +387,8 @@ Beyond this, `SyntaxData` nodes have *no significant public API*.
387
387
388
388
- `SyntaxData` are immutable.
389
389
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.
391
392
- `SyntaxData` have identity, i.e. they can be compared with "pointer equality".
392
393
- `SyntaxData` are implementation detail have no public API.
393
394
@@ -428,7 +429,7 @@ auto ReturnKW = SyntaxFactory::makeReturnKeyword({}, Trivia::spaces(1));
428
429
auto Return = SyntaxFactory::makeReturnStmt(ReturnKW, Integer,
429
430
/*Semicolon=*/ None);
430
431
431
- auto RightBrace = SyntaxFactory::makeLeftBraceToken ({}, {});
432
+ auto RightBrace = SyntaxFactory::makeRightBraceToken ({}, {});
432
433
433
434
auto Statements = SyntaxFactory::makeBlankStmtList()
434
435
.addStmt(Return);
0 commit comments