Commit 5eb5d4d3 authored by Robert Griesemer's avatar Robert Griesemer

`` strings may span multiple lines

R=rsc
DELTA=3  (2 added, 0 deleted, 1 changed)
OCL=30511
CL=30513
parent 05240bb2
...@@ -331,7 +331,7 @@ func (S *Scanner) scanRawString(pos token.Position) { ...@@ -331,7 +331,7 @@ func (S *Scanner) scanRawString(pos token.Position) {
for S.ch != '`' { for S.ch != '`' {
ch := S.ch; ch := S.ch;
S.next(); S.next();
if ch == '\n' || ch < 0 { if ch < 0 {
S.error(pos, "string not terminated"); S.error(pos, "string not terminated");
break; break;
} }
......
...@@ -63,6 +63,8 @@ var tokens = [...]elt{ ...@@ -63,6 +63,8 @@ var tokens = [...]elt{
elt{ token.CHAR, "'\\uff16'", literal }, elt{ token.CHAR, "'\\uff16'", literal },
elt{ token.CHAR, "'\\U0000ff16'", literal }, elt{ token.CHAR, "'\\U0000ff16'", literal },
elt{ token.STRING, "`foobar`", literal }, elt{ token.STRING, "`foobar`", literal },
elt{ token.STRING, "`" `foo
bar` "`", literal },
// Operators and delimitors // Operators and delimitors
elt{ token.ADD, "+", operator }, elt{ token.ADD, "+", operator },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment