Merge remote-tracking branch 'redux/master' into sh4-pool
[tamarin-stm.git] / esc / es4-doc / triple-quoted-strings.txt
blobba16d0bc53667c0e7616475f6136a98582586d15
1 NAME:        "Triply quoted string literals"
2 CATEGORY:    Lexical conventions (E262-3 ch 7)
3 SOURCES:     References [1], [4]
4 SPEC AUTHOR: Lars
5 STATUS:      OPEN ISSUES
6 REVIEWS:     (none)
7 IMPLEMENTED: RI; Tamarin+ESC
10 DESCRIPTION
12 A sequence of three unescaped SINGLEQUOTE or three unescaped
13 DOUBLEQUOTE characters signifies the start of a triply-quoted string
14 literal.  The literal is terminated by the earliest sequence of three
15 unescaped instances of the the same quote character that is not
16 followed by a fourth quote character of the same kind.
18 Arbitrary characters, including line terminator characters, are
19 allowed between the starting and ending quotes.  Following
20 determination of the starting and ending quotes the input text between
21 the starting and ending quotes is subject to escape character
22 processing, wherein sequences of characters starting with BACKSLASH
23 are replaced by those single characters signified by the sequences.
25 The escape character processing is performed exactly as for singly
26 quoted strings.
29 NOTES
31 As always, line terminator normalization [2] is in effect.
34 OPEN ISSUES
36 There is a note on the wiki [4] regarding whether \<lineterminator>
37 should be handled differently in triple-quoted strings than in
38 double-quoted strings.  Brendan's opinion is it should -- it should
39 escape the <lineterminator>.  The RI does not implement that behavior,
40 and the present proposal follows the RI.  See [3] for a more general
41 discussion.
44 DEFINITIONS
46 BACKSLASH=U+005C
47 SINGLEQUOTE=U+0027
48 DOUBLEQUOTE=U+0022
51 REFERENCES
53 [1] http://wiki.ecmascript.org/doku.php?id=proposals:triple_quotes
54 [2] "Line terminator normalization" spec
55 [3] "Line continuation in string literals" spec
56 [4] http://wiki.ecmascript.org/doku.php?id=proposals:line_terminator_normalization