]> Cypherpunks repositories - gostls13.git/commitdiff
struct annotations in imports.
authorRuss Cox <rsc@golang.org>
Thu, 30 Oct 2008 22:25:26 +0000 (15:25 -0700)
committerRuss Cox <rsc@golang.org>
Thu, 30 Oct 2008 22:25:26 +0000 (15:25 -0700)
distribute tag across multiple names.

R=ken
OCL=18178
CL=18178

src/cmd/gc/go.y
src/cmd/gc/subr.c

index c49c47f21e7145ff3124b8b6aadc81501dc4710e..cc5a101524f26045c9f59c1c62bf43ee5bef1b7e 100644 (file)
@@ -1892,10 +1892,11 @@ hidden_dcl:
        }
 
 hidden_structdcl:
-       sym1 hidden_type
+       sym1 hidden_type oliteral
        {
                $$ = nod(ODCLFIELD, newname($1), N);
                $$->type = $2;
+               $$->val = $3;
        }
 |      '?' hidden_type
        {
index d774a8d8349382cf6834ec63ec6a70d79d626d0b..24e894d897dc3d557fd79d4387d9b2880fcf1a65 100644 (file)
@@ -2192,8 +2192,10 @@ cleanidlist(Node *na)
        if(last->type == T)
                fatal("cleanidlist: no type");
 
-       for(n=na; n->op == OLIST; n=n->right)
+       for(n=na; n->op == OLIST; n=n->right) {
                n->left->type = last->type;
+               n->left->val = last->val;
+       }
        return na;
 }