Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1084)

Issue 1636043: code review 1636043: go/scanner: report illegal escape sequences (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 1 month ago by gri
Modified:
15 years, 1 month ago
Reviewers:
CC:
golang-dev, r
Visibility:
Public.

Description

go/scanner: report illegal escape sequences

Patch Set 1 #

Patch Set 2 : code review 1636043: go/scanner: report illegal escape sequences #

Total comments: 1

Patch Set 3 : code review 1636043: go/scanner: report illegal escape sequences #

Patch Set 4 : code review 1636043: go/scanner: report illegal escape sequences #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -21 lines) Patch
M src/cmd/gofmt/test.sh View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/go/scanner/scanner.go View 1 chunk +29 lines, -20 lines 0 comments Download

Messages

Total messages: 7
gri
Hello golang-dev@googlegroups.com, I'd like you to review this change.
15 years, 1 month ago (2010-06-09 21:59:52 UTC) #1
r
LGTM http://codereview.appspot.com/1636043/diff/2001/3002 File src/pkg/go/scanner/scanner.go (right): http://codereview.appspot.com/1636043/diff/2001/3002#newcode384 src/pkg/go/scanner/scanner.go:384: S.error(pos, "escape sequence is invalid Unicode code point") ...
15 years, 1 month ago (2010-06-09 22:11:48 UTC) #2
gri
On Wed, Jun 9, 2010 at 3:11 PM, <r@golang.org> wrote: > LGTM > > > ...
15 years, 1 month ago (2010-06-09 22:17:27 UTC) #3
gri
*** Submitted as http://code.google.com/p/go/source/detail?r=675630332425 *** go/scanner: report illegal escape sequences R=golang-dev, r CC=golang-dev http://codereview.appspot.com/1636043
15 years, 1 month ago (2010-06-09 22:19:28 UTC) #4
r2
On Jun 9, 2010, at 3:17 PM, Robert Griesemer wrote: > On Wed, Jun 9, ...
15 years, 1 month ago (2010-06-09 22:22:57 UTC) #5
rsc
> gofmt provides precise column information, so the offending value is clearly > identified it ...
15 years, 1 month ago (2010-06-09 22:57:50 UTC) #6
gri
15 years, 1 month ago (2010-06-09 23:07:46 UTC) #7
On Wed, Jun 9, 2010 at 3:57 PM, Russ Cox <rsc@golang.org> wrote:

> > gofmt provides precise column information, so the offending value is
> clearly
> > identified
>
> it is identified, but not clearly.
> having to count the columns is much
> more work and less clear for the
> programmer than being told what is wrong.
>

I think we are nitpicking here. If there are indeed more than one such
escape value in the string it's about as hard to look at the column counter
of the editor (most have one) as it is to manually compare 2 hex numbers.


> if you don't want to use Sprintf there is
> always strconv, which is already imported.
>

As I said before, at some point the error function should report more
information but for now this is good enough
- Robert
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b