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
@@ -505,15 +505,15 @@ following fields:
505
505
506
506
| Key | Type | Description |
507
507
| --- | ---- | ----------- |
508
-
|`kind`|`String`| The `SyntaxKind` of this child. This must have a corresponding `Node` with that kind. |
508
+
|`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`). |
509
509
| `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.
510
510
|`token_choices`|`[String]?`| A list of `Token`s which are considered "valid" values for `Token` children. |
511
511
|`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`. |
512
512
513
513
#### Tokens
514
514
515
515
A `Token` represents one of the `tok::` enums in
516
-
`include/Syntax/TokenKinds.def`. `Token.py` has a top-level array of token
516
+
`include/swift/Syntax/TokenKinds.def`. `Token.py` has a top-level array of token
517
517
declarations. The `Token` class has the following fields.
0 commit comments