diff --git a/spec/01-lexical-syntax.md b/spec/01-lexical-syntax.md index 921384b40e20..36f6daaa989d 100644 --- a/spec/01-lexical-syntax.md +++ b/spec/01-lexical-syntax.md @@ -8,6 +8,11 @@ chapter: 1 Scala source code consists of Unicode text. +The nine [Bidirectional explicit formatting](https://www.unicode.org/reports/tr9/#Bidirectional_Character_Types) +characters `\u202a - \u202e` and `\u2066 - \u2069` (inclusive) are forbidden +from appearing in source files. Note that they can be represented using +unicode escapes in string and character literals. + The program text is tokenized as described in this chapter. See the last section for special support for XML literals, which are parsed in _XML mode_. diff --git a/spec/13-syntax-summary.md b/spec/13-syntax-summary.md index 6ece538e2ff1..65eb47049519 100644 --- a/spec/13-syntax-summary.md +++ b/spec/13-syntax-summary.md @@ -8,6 +8,11 @@ chapter: 13 The following descriptions of Scala tokens uses literal characters `ā€˜cā€™` when referring to the ASCII fragment `\u0000` ā€“ `\u007F`. +The nine [Bidirectional explicit formatting](https://www.unicode.org/reports/tr9/#Bidirectional_Character_Types) +characters `\u202a - \u202e` and `\u2066 - \u2069` (inclusive) are forbidden +from appearing in source files. Note that they can be represented using +unicode escapes in string and character literals. + ## Lexical Syntax The lexical syntax of Scala is given by the following grammar in EBNF form: