LEFT | RIGHT |
(no file at all) | |
1 // Copyright 2009 The Go Authors. All rights reserved. | 1 // Copyright 2009 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 #include "go.h" | 5 #include "go.h" |
6 #include "y.tab.h" | 6 #include "y.tab.h" |
7 | 7 |
8 static void funcargs(Node*); | 8 static void funcargs(Node*); |
9 | 9 |
10 static int | 10 static int |
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
813 } | 813 } |
814 continue; | 814 continue; |
815 } | 815 } |
816 | 816 |
817 f = typ(TFIELD); | 817 f = typ(TFIELD); |
818 f->type = n->type; | 818 f->type = n->type; |
819 f->note = note; | 819 f->note = note; |
820 f->width = BADWIDTH; | 820 f->width = BADWIDTH; |
821 f->isddd = n->isddd; | 821 f->isddd = n->isddd; |
822 | 822 |
| 823 // esc.c needs to find f given a PPARAM to add the tag. |
| 824 if(funarg && n->left && n->left->class == PPARAM) |
| 825 n->left->paramfld = f; |
| 826 |
823 if(left != N && left->op == ONAME) { | 827 if(left != N && left->op == ONAME) { |
824 f->nname = left; | 828 f->nname = left; |
825 f->embedded = n->embedded; | 829 f->embedded = n->embedded; |
826 f->sym = f->nname->sym; | 830 f->sym = f->nname->sym; |
827 if(importpkg && !exportname(f->sym->name)) | 831 if(importpkg && !exportname(f->sym->name)) |
828 f->sym = pkglookup(f->sym->name, structpkg); | 832 f->sym = pkglookup(f->sym->name, structpkg); |
829 if(f->sym && !isblank(f->nname)) { | 833 if(f->sym && !isblank(f->nname)) { |
830 for(t1=*t0; t1!=T; t1=t1->down) { | 834 for(t1=*t0; t1!=T; t1=t1->down) { |
831 if(t1->sym == f->sym) { | 835 if(t1->sym == f->sym) { |
832 yyerror("duplicate %s %s", what,
t1->sym->name); | 836 yyerror("duplicate %s %s", what,
t1->sym->name); |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1245 dclcontext = PAUTO; | 1249 dclcontext = PAUTO; |
1246 funcdepth = n->funcdepth + 1; | 1250 funcdepth = n->funcdepth + 1; |
1247 compile(n); | 1251 compile(n); |
1248 curfn = nil; | 1252 curfn = nil; |
1249 funcdepth = 0; | 1253 funcdepth = 0; |
1250 dclcontext = PEXTERN; | 1254 dclcontext = PEXTERN; |
1251 } | 1255 } |
1252 | 1256 |
1253 | 1257 |
1254 | 1258 |
LEFT | RIGHT |