mirror of
https://github.com/golang/go
synced 2024-11-22 01:54:42 -07:00
gc: backslash newline is not a legal escape sequence in strings
Fixes #827. R=ken2 CC=golang-dev, rsc https://golang.org/cl/1592041
This commit is contained in:
parent
440cc95470
commit
0c222d6e49
@ -1160,7 +1160,6 @@ escchar(int e, int *escflg, vlong *val)
|
|||||||
|
|
||||||
*escflg = 0;
|
*escflg = 0;
|
||||||
|
|
||||||
loop:
|
|
||||||
c = getr();
|
c = getr();
|
||||||
switch(c) {
|
switch(c) {
|
||||||
case EOF:
|
case EOF:
|
||||||
@ -1180,9 +1179,6 @@ loop:
|
|||||||
|
|
||||||
c = getr();
|
c = getr();
|
||||||
switch(c) {
|
switch(c) {
|
||||||
case '\n':
|
|
||||||
goto loop;
|
|
||||||
|
|
||||||
case 'x':
|
case 'x':
|
||||||
*escflg = 1; // it's a byte
|
*escflg = 1; // it's a byte
|
||||||
i = 2;
|
i = 2;
|
||||||
|
Loading…
Reference in New Issue
Block a user