summaryrefslogtreecommitdiff
path: root/parse/gram.y
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2017-06-28 03:24:57 -0700
committerOri Bernstein <ori@markovcorp.com>2017-06-28 10:59:54 -0700
commit567766b0cb773c76a9ec0d16246bd27b4a46b851 (patch)
tree47da5cff2284f691083c6b8445ded0047a174e85 /parse/gram.y
parent6f5af8562ed5547ddaeb15ba7ed4a334318ca53f (diff)
downloadmc-567766b0cb773c76a9ec0d16246bd27b4a46b851.tar.gz
Remove unused memb from Trait and rename funcs -> proto
These are prototype declarations that must be implemented by the impl (not necessarily functions), so proto seems like a better name.
Diffstat (limited to 'parse/gram.y')
-rw-r--r--parse/gram.y10
1 files changed, 4 insertions, 6 deletions
diff --git a/parse/gram.y b/parse/gram.y
index 428bd4b..3839a92 100644
--- a/parse/gram.y
+++ b/parse/gram.y
@@ -229,8 +229,8 @@ toplev : package
| traitdef {
size_t i;
puttrait(file->file.globls, $1->name, $1);
- for (i = 0; i < $1->nfuncs; i++)
- putdcl(file->file.globls, $1->funcs[i]);
+ for (i = 0; i < $1->nproto; i++)
+ putdcl(file->file.globls, $1->proto[i]);
}
| tydef {
puttype(file->file.globls, mkname($1.loc, $1.name), $1.type);
@@ -344,8 +344,8 @@ pkgitem : decl {
size_t i;
$1->vis = Visexport;
puttrait(file->file.globls, $1->name, $1);
- for (i = 0; i < $1->nfuncs; i++)
- putdcl(file->file.globls, $1->funcs[i]);
+ for (i = 0; i < $1->nproto; i++)
+ putdcl(file->file.globls, $1->proto[i]);
}
| implstmt {
$1->impl.vis = Visexport;
@@ -411,7 +411,6 @@ traitdef: Ttrait Tident generictype optauxtypes { /* trait prototype */
mkname($2->loc, $2->id), $3,
$4.types, $4.ntypes,
NULL, 0,
- NULL, 0,
1);
}
| Ttrait Tident generictype optauxtypes Tasn traitbody Tendblk /* trait definition */ {
@@ -419,7 +418,6 @@ traitdef: Ttrait Tident generictype optauxtypes { /* trait prototype */
$$ = mktrait($1->loc,
mkname($2->loc, $2->id), $3,
$4.types, $4.ntypes,
- NULL, 0,
$6.nl, $6.nn,
0);
for (i = 0; i < $6.nn; i++) {