Skip to content

Commit 4c0e106

Browse files
authoredAug 10, 2016
*: goyacc generated code tiny change (pingcap#1574)
1 parent 3ad8259 commit 4c0e106

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎parser/goyacc/main.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -421,9 +421,9 @@ type %[1]sXError struct {
421421
f.Format("%u}\n")
422422

423423
// Reduction table
424-
f.Format("\n%sReductions = map[int]struct{xsym, components int}{%i\n", *oPref)
425-
for r, rule := range p.Rules {
426-
f.Format("%d: {%d, %d},\n", r, xlat[rule.Sym.Value], len(rule.Components))
424+
f.Format("\n%sReductions = []struct{xsym, components int}{%i\n", *oPref)
425+
for _, rule := range p.Rules {
426+
f.Format("{%d, %d},\n", xlat[rule.Sym.Value], len(rule.Components))
427427
}
428428
f.Format("%u}\n")
429429

0 commit comments

Comments
 (0)
Please sign in to comment.