%type <node> indcl interfacetype structtype ptrtype
%type <node> recvchantype non_recvchantype othertype fnret_type fntype
+%type <val> hidden_tag
+
%type <sym> hidden_importsym hidden_pkg_importsym
%type <node> hidden_constant hidden_literal hidden_dcl
}
hidden_structdcl:
- sym hidden_type oliteral
+ sym hidden_type hidden_tag
{
$$ = nod(ODCLFIELD, newname($1), typenod($2));
$$->val = $3;
}
-| '?' hidden_type oliteral
+| '?' hidden_type hidden_tag
{
Sym *s;
$$->val = $3;
}
+hidden_tag:
+ {
+ $$.ctype = CTxxx;
+ }
+| ':' LLITERAL // extra colon avoids conflict with "" looking like beginning of "".typename
+ {
+ $$ = $2;
+ }
+
hidden_interfacedcl:
sym '(' ohidden_funarg_list ')' ohidden_funres
{
fmtprint(fp, "... %T", t->type->type);
} else
fmtprint(fp, "%T", t->type);
- if(t->note)
- fmtprint(fp, " \"%Z\"", t->note);
+ if(t->note) {
+ fmtprint(fp, " ");
+ if(exporting)
+ fmtprint(fp, ":");
+ fmtprint(fp, "\"%Z\"", t->note);
+ }
return 0;
case TFORW:
--- /dev/null
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p1
+
+type T struct {
+ f func() "x"
+}
+
--- /dev/null
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p2
+
+import _ "./p1"
+
--- /dev/null
+// $G $D/$F.dir/p1.go && $G $D/$F.dir/p2.go
+
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+ignored