diff options
author | Som Snytt <som.snytt@gmail.com> | 2015-06-29 07:57:33 -0700 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2015-06-29 07:57:33 -0700 |
commit | ab527ce8cc0220443bda5cc3337ebae158c2fe74 (patch) | |
tree | 415931bf3424c5a53c4aba346f7679cc9d33f0a7 /spec/13-syntax-summary.md | |
parent | aad7c67fe047c6ea9b40ff9588adf0b51dbcf57b (diff) | |
download | scala-ab527ce8cc0220443bda5cc3337ebae158c2fe74.tar.gz scala-ab527ce8cc0220443bda5cc3337ebae158c2fe74.tar.bz2 scala-ab527ce8cc0220443bda5cc3337ebae158c2fe74.zip |
SI-6810 Spec reflects literal parsing literally
Emphasize that literal parsing accepts Unicode escapes
as if they were escaped. In particular, a newline
represented by its Unicode escape does not terminate
the line in the middle of a literal.
Diffstat (limited to 'spec/13-syntax-summary.md')
-rw-r--r-- | spec/13-syntax-summary.md | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/13-syntax-summary.md b/spec/13-syntax-summary.md index 7f73e107de..a4b4aae570 100644 --- a/spec/13-syntax-summary.md +++ b/spec/13-syntax-summary.md @@ -57,11 +57,12 @@ floatType ::= ‘F’ | ‘f’ | ‘D’ | ‘d’ booleanLiteral ::= ‘true’ | ‘false’ -characterLiteral ::= ‘'’ (printableChar | charEscapeSeq) ‘'’ +characterLiteral ::= ‘'’ (charNoQuoteOrNewline | UnicodeEscape | charEscapeSeq) ‘'’ stringLiteral ::= ‘"’ {stringElement} ‘"’ | ‘"""’ multiLineChars ‘"""’ -stringElement ::= (printableChar except ‘"’) +stringElement ::= charNoDoubleQuoteOrNewline + | UnicodeEscape | charEscapeSeq multiLineChars ::= {[‘"’] [‘"’] charNoDoubleQuote} {‘"’} |