scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 1ca89cac46831770fd9fcde016b7c8a1d5ff7e58
parent e879cdfcae193d1ee6d3615534f2d44843a0a229
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Wed,  6 May 2015 18:44:16 +0200

Fix typo in right field

This is a bit embarrasing, but I mistook right with rigth in all the places,
so this commit changes it.

Diffstat:
Mcc1/cc1.h | 2+-
Mcc1/code.c | 12++++++------
2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/cc1/cc1.h b/cc1/cc1.h @@ -143,7 +143,7 @@ typedef struct node { bool lvalue : 1; bool symbol: 1; bool constant : 1; - struct node *left, *rigth; + struct node *left, *right; } Node; enum { diff --git a/cc1/code.c b/cc1/code.c @@ -110,7 +110,7 @@ freetree(Node *np) if (!np) return; freetree(np->left); - freetree(np->rigth); + freetree(np->right); free(np); } @@ -203,7 +203,7 @@ emitbin(uint8_t op, void *arg) Node *np = arg; emitnode(np->left); - emitnode(np->rigth); + emitnode(np->right); printf("\t%s%c", optxt[op], np->type->letter); } @@ -213,8 +213,8 @@ emitternary(uint8_t op, void *arg) Node *cond, *ifyes, *ifno, *np = arg; cond = np->left; - ifyes = np->rigth->left; - ifno = np->rigth->rigth; + ifyes = np->right->left; + ifno = np->right->right; emitnode(cond); emitnode(ifyes); emitnode(ifno); @@ -298,7 +298,7 @@ emitfield(uint8_t op, void *arg) } Node * -node(uint8_t op, Type *tp, Node *left, Node *rigth) +node(uint8_t op, Type *tp, Node *left, Node *right) { Node *np; @@ -308,7 +308,7 @@ node(uint8_t op, Type *tp, Node *left, Node *rigth) np->sym = NULL; np->constant = np->symbol = np->lvalue = 0; np->left = left; - np->rigth = rigth; + np->right = right; return np; }