Add \s to the list of escapes

This commit is contained in:
Kat Marchán 2023-12-14 19:25:12 -08:00
parent 9f061537c9
commit 56f399bf71
No known key found for this signature in database
GPG Key ID: AEB529C08A3C7E9E
2 changed files with 3 additions and 0 deletions

View File

@ -5,6 +5,8 @@
### Grammar ### Grammar
* Solidus/Forward slash (`/`) is no longer an escaped character. * Solidus/Forward slash (`/`) is no longer an escaped character.
* Space (`U+0020`) can now be written into quoted strings with the `\s`
escape.
* Single line comments (`//`) can now be immediately followed by a newline. * Single line comments (`//`) can now be immediately followed by a newline.
* All literal whitespace following a `\` in a string is now discarded. * All literal whitespace following a `\` in a string is now discarded.
* Vertical tabs (`U+000B`) are now considered to be whitespace. * Vertical tabs (`U+000B`) are now considered to be whitespace.

View File

@ -381,6 +381,7 @@ interpreted as described in the following table:
| Quotation Mark (Double Quote) | `\"` | `U+0022` | | Quotation Mark (Double Quote) | `\"` | `U+0022` |
| Backspace | `\b` | `U+0008` | | Backspace | `\b` | `U+0008` |
| Form Feed | `\f` | `U+000C` | | Form Feed | `\f` | `U+000C` |
| Space | `\s` | `U+0020` |
| Unicode Escape | `\u{(1-6 hex chars)}` | Code point described by hex characters, as long as it represents a [Unicode Scalar Value](https://unicode.org/glossary/#unicode_scalar_value) | | Unicode Escape | `\u{(1-6 hex chars)}` | Code point described by hex characters, as long as it represents a [Unicode Scalar Value](https://unicode.org/glossary/#unicode_scalar_value) |
| Whitespace Escape | See below | N/A | | Whitespace Escape | See below | N/A |