Skip to content

Commit

Permalink
[Clarification] Escape sequences in strings.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
leebyron committed Oct 28, 2016
1 parent f42dab5 commit c9b6827
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions spec/Section 2 -- Language.md
Original file line number Diff line number Diff line change
Expand Up @@ -729,12 +729,23 @@ StringCharacter :: SourceCharacter but not `"` or \ or LineTerminator

StringCharacter :: \u EscapedUnicode

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

StringCharacter :: \ EscapedCharacter

* Return the character value of {EscapedCharacter}.
* Return the character value of {EscapedCharacter} according to the table below.

| Escaped Character | Code Unit Value | Character Name |
----------------------------------------------------------------------
| `"` | 0x0022 | double quote |
| `\` | 0x005C | reverse solidus (back slash) |
| `/` | 0x002F | solidus (forward slash) |
| `b` | 0x0008 | backspace |
| `f` | 0x000C | form feed |
| `n` | 0x000A | line feed (new line) |
| `r` | 0x000D | carriage return |
| `t` | 0x0009 | horizontal tab |


### Null Value
Expand Down

0 comments on commit c9b6827

Please sign in to comment.