ref: 8598fc2ddda25582d489052e1e4668041ecb5d79
parent: 9651121c224dbcd30ad00b659a9c765590cfae8a
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Thu Mar 31 14:21:05 EDT 2016
[cc2] Change addnode() to addstmt() Addnode() was not a good name because it was suggesting that we were adding the current node to some data structure, but in fact we were adding the node of the current statement into the function body list.
--- a/cc2/parser.c
+++ b/cc2/parser.c
@@ -592,11 +592,10 @@
nextline();
stmtp->label = sym;
sym->u.label = stmtp;
-
}
static void
-addnode(Node *np)
+addstmt(Node *np)
{
if (!curfun->u.label)
curfun->u.label = np;
@@ -616,7 +615,7 @@
deltree(np);
return;
}
- addnode(np);
+ addstmt(np);
}
static void
@@ -634,7 +633,7 @@
np = newnode();
np->op = ONOP;
- addnode(np);
+ addstmt(np);
/* TODO: process the function */
curfun = NULL;
funpars = -1;
--
⑨