Tweak cgen's constants' format

This commit is contained in:
Nigel Tao committed 2019-02-02 15:55:25 +11:00
1 parent be2d96bb27
commit 022d221266
2 files changed
+47 -32

No files matched your search

+2 -2
View File
@@ -687,10 +687,10 @@ func (g *gen) writeConst(b *buffer, n *a.Const) error {
b.writes("static ")
}
b.writes("const ")
if err := g.writeCTypeName(b, n.XType(), g.pkgPrefix, n.QID()[1].Str(g.tm)); err != nil {
if err := g.writeCTypeName(b, n.XType(), "//\n"+g.pkgPrefix, n.QID()[1].Str(g.tm)); err != nil {
return err
}
b.writes(" WUFFS_BASE__POTENTIALLY_UNUSED = ")
b.writes("//\n WUFFS_BASE__POTENTIALLY_UNUSED = ")
if err := g.writeConstList(b, n.Value()); err != nil {
return err
}