diff --git a/Sources/TSPL/TSPL.docc/ReferenceManual/LexicalStructure.md b/Sources/TSPL/TSPL.docc/ReferenceManual/LexicalStructure.md index a52696f11..266a86b6c 100644 --- a/Sources/TSPL/TSPL.docc/ReferenceManual/LexicalStructure.md +++ b/Sources/TSPL/TSPL.docc/ReferenceManual/LexicalStructure.md @@ -122,9 +122,17 @@ are reserved for the Swift compiler and standard library. To use a reserved word as an identifier, put a backtick (\`) before and after it. For example, `class` isn't a valid identifier, -but \``class`\` is valid. +but `` `class` `` is valid. The backticks aren't considered part of the identifier; -\``x`\` and `x` have the same meaning. +`` `x` `` and `x` have the same meaning. + + Inside a closure with no explicit parameter names, the parameters are implicitly named `$0`, `$1`, `$2`, and so on. @@ -143,6 +151,15 @@ of the chapter. the section name isn't title case so it doesn't necessarily look like a title. --> + + > Grammar of an identifier: > > *identifier* → *identifier-head* *identifier-characters*_?_ @@ -430,7 +447,7 @@ The following tokens are reserved as punctuation and can't be used as custom operators: `(`, `)`, `{`, `}`, `[`, `]`, `.`, `,`, `:`, `;`, `=`, `@`, `#`, -`&` (as a prefix operator), `->`, `\\``, +`&` (as a prefix operator), `->`, `` ` ``, `?`, and `!` (as a postfix operator). ## Literals