FAQ
Reviewers: golang-dev_googlegroups.com,

Message:
Hello golang-dev@googlegroups.com,

I'd like you to review this change to
https://code.google.com/p/go


Description:
cmd/yacc: always import fmt, safely
The parser depends on it but the client might not import it, so make
sure it's there.
Fixes issue 4038.

Please review this at http://codereview.appspot.com/6497094/

Affected files:
M src/cmd/yacc/yacc.go

Search Discussions

  • Rsc at Sep 6, 2012 at 9:52 pm
    LGTM

    An alternative to the line based approach would be to write a loop over
    the raw rune slice: it should be easy to skip over /* */ and // comments
    during the loop, and 'package' has to be the first non-comment you see.
    But this is fine too.

    Thanks for the fix.



    http://codereview.appspot.com/6497094/diff/1/src/cmd/yacc/yacc.go
    File src/cmd/yacc/yacc.go (right):

    http://codereview.appspot.com/6497094/diff/1/src/cmd/yacc/yacc.go#newcode1116
    src/cmd/yacc/yacc.go:1116: // adds an import for __fmt__ after the
    package clause
    yy

    http://codereview.appspot.com/6497094/
  • Rob Pike at Sep 6, 2012 at 9:58 pm
    i need to count lines too, for the //line update, so i'll leave it as is.

    -rob
  • R at Sep 6, 2012 at 9:59 pm
    *** Submitted as
    http://code.google.com/p/go/source/detail?r=95fb3bcdc941 ***

    cmd/yacc: always import fmt, safely
    The parser depends on it but the client might not import it, so make
    sure it's there.
    Fixes issue 4038.

    R=golang-dev, rsc
    CC=golang-dev
    http://codereview.appspot.com/6497094


    http://codereview.appspot.com/6497094/
  • R at Sep 6, 2012 at 10:02 pm
    Hello golang-dev@googlegroups.com, rsc@golang.org (cc:
    golang-dev@googlegroups.com),

    Please take another look.


    http://codereview.appspot.com/6497094/

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedSep 6, '12 at 9:47p
activeSep 6, '12 at 10:02p
posts5
users2
websitegolang.org

2 users in discussion

R: 4 posts Rsc: 1 post

People

Translate

site design / logo © 2022 Grokbase