Commit 5baaa490 authored by Russ Cox's avatar Russ Cox

gc: better printing of named constants, func literals

R=ken2
CC=golang-dev
https://golang.org/cl/2121045
parent 889377c5
......@@ -119,6 +119,10 @@ exprfmt(Fmt *f, Node *n, int prec)
break;
case OLITERAL:
if(n->sym != S) {
fmtprint(f, "%S", n->sym);
break;
}
switch(n->val.ctype) {
default:
goto bad;
......@@ -259,6 +263,10 @@ exprfmt(Fmt *f, Node *n, int prec)
exprfmt(f, n->left, 0);
break;
case OCLOSURE:
fmtprint(f, "func literal");
break;
case OCOMPLIT:
fmtprint(f, "composite literal");
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment