You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/Syntax/README.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -260,7 +260,7 @@ pieces of syntax that aren't really relevant to the semantics of the program,
260
260
such as whitespace and comments. These are modeled as collections and, with the
261
261
exception of comments, are sort of "run-length" encoded. For example, a sequence
262
262
of four spaces is represented by `{ Kind: TriviaKind::Space, Count: 4 }`, not
263
-
the literal text `""`.
263
+
the literal text `""`.
264
264
265
265
Some examples of the "atoms" of `Trivia`:
266
266
@@ -502,15 +502,15 @@ following fields:
502
502
503
503
| Key | Type | Description |
504
504
| --- | ---- | ----------- |
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`). |
506
506
| `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.
507
507
|`token_choices`|`[String]?`| A list of `Token`s which are considered "valid" values for `Token` children. |
508
508
|`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`. |
509
509
510
510
#### Tokens
511
511
512
512
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
514
514
declarations. The `Token` class has the following fields.
0 commit comments