Skip to content

Commit e965336

Browse files
authored
Merge pull request #1933 from gibachan/fix-typos
Fix typos in some .md files
2 parents aa3b1e1 + 798ee7f commit e965336

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

CodeGeneration/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This directory contains file to generate source code that is part of the SwiftSy
55
Some source code inside SwiftSyntax is generated using [SwiftSyntaxBuilder](../Sources/SwiftSyntaxBuilder), a Swift library whose purpose is to generate Swift code using Swift itself. This kind of code generation is performed by the Swift package defined in this directory.
66

77
This directory is a standalone package that uses swift-syntax from the outer directory.
8-
If you are making significant changs to `CodeGeneration` locally and want to avoid breaking the build of `CodeGeneration` itself by generating new files in the parent swift-syntax package, it is encouraged to change the dependency from
8+
If you are making significant changes to `CodeGeneration` locally and want to avoid breaking the build of `CodeGeneration` itself by generating new files in the parent swift-syntax package, it is encouraged to change the dependency from
99
```swift
1010
.package(path: "..")
1111
```

EditorExtension/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ sub-menu, so mousing over it will reveal all of the actions that the editor
6464
extension detected at start up.
6565

6666
Selecting a refactoring action will run it over the entire file. The plugin
67-
executes the corresponding `RefactoringProvider` and, whenever it recieves a
67+
executes the corresponding `RefactoringProvider` and, whenever it receives a
6868
non-`nil` response, it performs a structured edit of the syntax of the code.
6969

7070
## Troubleshooting

Sources/SwiftParser/SwiftParser.docc/FixingBugs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ To add a new, more contextual diagnostic, perform the following steps.
6565
```
6666
2. Mark the location at which you expect the diagnostic to be produced with `1️⃣`. If you expect multiple diagnostics to be produced, you can use multiple of these markers with different names and use these markers by passing a `locationMarker` to `DiagnosticSpec`. The list of valid marker emojis can be found in `Character.isMarkerEmoji`.
6767
3. Determine which node encompasses all information that is necessary to produce the improved diagnostic – for example `FunctionSignatureSyntax` contains all information to diagnose if the `throws` keyword was written after the `->` instead of in front of it.
68-
4. If the diagnostic message you want to emit does not exist yet, add a case to `StaticParserError` for the new diagnostic. If the diagnostic needs to take parameters, add a new struct to in `ParserDiagnsoticMessages.swift`.
68+
4. If the diagnostic message you want to emit does not exist yet, add a case to `StaticParserError` for the new diagnostic. If the diagnostic needs to take parameters, add a new struct to in `ParserDiagnosticMessages.swift`.
6969
5. If the function does not already exist, write a new visit method on `ParseDiagnosticsGenerator`.
7070
6. In that visitation method, detect the pattern for which the improved diagnostic should be emitted and emit it using `diagnostics.append`.
7171
7. Mark the missing or garbage nodes that are covered by the new diagnostic as handled by adding their `SyntaxIdentifier`s to `handledNodes`.
7272
8. If the diagnostic produces Fix-Its assert that they are generated by adding the Fix-It's message to the `DiagnosticSpec` with the `fixIt` parameter and asserting that applying the Fix-Its produces the correct source code by adding the `fixedSource` parameter to `assertParse`.
7373
74-
> 💡 Tip: To make typing the marker emojis more convienient. you can set up code snippets in Xcode. To do this, perform the following steps:
74+
> 💡 Tip: To make typing the marker emojis more convenient. you can set up code snippets in Xcode. To do this, perform the following steps:
7575
> 1. Type the marker in any Xcode window or find it in some test case
7676
> 2. Select the emoji, right-click it and select “Create Code Snippet…”
7777
> 3. Replace “My Code Snippet” by the emoji marker character and in for “Availability” select “Comment or String”

Sources/SwiftSyntax/Documentation.docc/Glossary.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ To avoid ongoing repetition of common long terms, SwiftSyntax uses a couple of a
1313

1414
**Expr** Abbreviation for *Expression*
1515

16-
**Layout Node** A layout node has can have an arbitrary number of children and provides structure to the syntax tree. All ``Syntax`` nodes that aren’t ``TokenSyntax`` are layout nodes. For example a ``StructDeclSyntax`` consists of, among others, of the `struct` keyword, the name and the `memberBlock`. The latter is again a layout node that contains multiple children. Layout nodes never represent any source code in the syntax tree by themselves. All source code within the syntax tree is represented by *tokens*.
16+
**Layout Node** A layout node can have an arbitrary number of children and provides structure to the syntax tree. All ``Syntax`` nodes that aren’t ``TokenSyntax`` are layout nodes. For example a ``StructDeclSyntax`` consists of, among others, of the `struct` keyword, the name and the `memberBlock`. The latter is again a layout node that contains multiple children. Layout nodes never represent any source code in the syntax tree by themselves. All source code within the syntax tree is represented by *tokens*.
1717

1818
**Node** A *layout node* or *token*
1919

0 commit comments

Comments
 (0)