Skip to content

Commit 021763a

Browse files
committed
Some documentation fixes
Replace &nbsp with   fix TokenKinds.def path; fix Child documentation
1 parent 4058407 commit 021763a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/Syntax/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ pieces of syntax that aren't really relevant to the semantics of the program,
260260
such as whitespace and comments. These are modeled as collections and, with the
261261
exception of comments, are sort of "run-length" encoded. For example, a sequence
262262
of four spaces is represented by `{ Kind: TriviaKind::Space, Count: 4 }`, not
263-
the literal text `" "`.
263+
the literal text `"    "`.
264264

265265
Some examples of the "atoms" of `Trivia`:
266266

@@ -502,15 +502,15 @@ following fields:
502502

503503
| Key | Type | Description |
504504
| --- | ---- | ----------- |
505-
| `kind` | `String` | The `SyntaxKind` of this child. This must have a corresponding `Node` with that kind. |
505+
| `kind` | `String` | The `SyntaxKind` of this child. This must have a corresponding `Node` with that kind (or corresponding `Token` in both `include/swift/Syntax/TokenKinds.def` and `SYNTAX_TOKENS`). |
506506
| `is_optional` | `Bool?` | Whether this child is required in a fully-formed object, or if it is allowed to remain `missing`. Defaults to `false` if not present.
507507
| `token_choices` | `[String]?` | A list of `Token`s which are considered "valid" values for `Token` children. |
508508
| `text_choices` | `[String]?` | A list of valid textual values for tokens. If this is not provided, any textual value is accepted for tokens like `IdentifierToken`. |
509509

510510
#### Tokens
511511

512512
A `Token` represents one of the `tok::` enums in
513-
`include/Syntax/TokenKinds.def`. `Token.py` has a top-level array of token
513+
`include/swift/Syntax/TokenKinds.def`. `Token.py` has a top-level array of token
514514
declarations. The `Token` class has the following fields.
515515

516516
| Key | Type | Description |

0 commit comments

Comments
 (0)