1 NAME: "Triply quoted string literals"
2 CATEGORY: Lexical conventions (E262-3 ch 7)
3 SOURCES: References [1], [4]
7 IMPLEMENTED: RI; Tamarin+ESC
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
31 As always, line terminator normalization [2] is in effect.
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
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