Skip to content

Commit c9b6827

Browse files
committed
[Clarification] Escape sequences in strings.
This clears up the language for unicode escape sequences in strings, and adds a conversion table to remove ambiguity from character escape sequences. Suggested by #214
1 parent f42dab5 commit c9b6827

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

spec/Section 2 -- Language.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -729,12 +729,23 @@ StringCharacter :: SourceCharacter but not `"` or \ or LineTerminator
729729

730730
StringCharacter :: \u EscapedUnicode
731731

732-
* Return the character value represented by the UTF16 hexidecimal
733-
identifier {EscapedUnicode}.
732+
* Return the character whose code unit value in the Unicode Basic Multilingual
733+
Plane is the 16-bit hexadecimal value {EscapedUnicode}.
734734

735735
StringCharacter :: \ EscapedCharacter
736736

737-
* Return the character value of {EscapedCharacter}.
737+
* Return the character value of {EscapedCharacter} according to the table below.
738+
739+
| Escaped Character | Code Unit Value | Character Name |
740+
----------------------------------------------------------------------
741+
| `"` | 0x0022 | double quote |
742+
| `\` | 0x005C | reverse solidus (back slash) |
743+
| `/` | 0x002F | solidus (forward slash) |
744+
| `b` | 0x0008 | backspace |
745+
| `f` | 0x000C | form feed |
746+
| `n` | 0x000A | line feed (new line) |
747+
| `r` | 0x000D | carriage return |
748+
| `t` | 0x0009 | horizontal tab |
738749

739750

740751
### Null Value

0 commit comments

Comments
 (0)