Skip to content

Commit

Permalink
cmd/yacc: fix copying action code when line comment is disabled
Browse files Browse the repository at this point in the history
Fixes golang#12601.

Change-Id: I0be69ffe9ba19934aaef1651845c725708db77de
Reviewed-on: https://go-review.googlesource.com/14546
Reviewed-by: Ian Lance Taylor <[email protected]>
  • Loading branch information
minux committed Oct 4, 2015
1 parent f12b620 commit 62491ff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cmd/yacc/yacc.go
Original file line number Diff line number Diff line change
Expand Up @@ -1284,8 +1284,9 @@ func dumpprod(curprod []int, max int) {
func cpyact(curprod []int, max int) {

if !lflag {
fmt.Fprintf(fcode, "\n\t\t//line %v:%v\n\t\t", infile, lineno)
fmt.Fprintf(fcode, "\n\t\t//line %v:%v", infile, lineno)
}
fmt.Fprint(fcode, "\n\t\t")

lno := lineno
brac := 0
Expand Down

0 comments on commit 62491ff

Please sign in to comment.