scc

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

commit 9f0411880dcba1a99d5b7d76c0dc77424a139783
parent 158f03fe23f56bdfd5039cddce176d22f0278601
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Thu, 26 Jul 2012 19:11:32 +0200

Changed type of nodeop to returning a symbol

After the execution of each nodeop we will get a symbol form the
operation (maybe a temporal one, or maybe not).

Diffstat:
Mcode.c | 88++++++++++++++++++++++++++++++++++++++++----------------------------------------
Msyntax.h | 2+-
2 files changed, 45 insertions(+), 45 deletions(-)

diff --git a/code.c b/code.c @@ -1,177 +1,177 @@ #include "syntax.h" -void op_ary(struct node *np) +struct symbol *op_ary(struct node *np) { } -void op_call(struct node *np) +struct symbol *op_call(struct node *np) { } -void op_field(struct node *np) +struct symbol *op_field(struct node *np) { } -void op_ptr(struct node *np) +struct symbol *op_ptr(struct node *np) { } -void op_postinc(struct node *np) +struct symbol *op_postinc(struct node *np) { } -void op_postdec(struct node *np) +struct symbol *op_postdec(struct node *np) { } -void op_preinc(struct node *np) +struct symbol *op_preinc(struct node *np) { } -void op_predec(struct node *np) +struct symbol *op_predec(struct node *np) { } -void op_addr(struct node *np) +struct symbol *op_addr(struct node *np) { } -void op_indir(struct node *np) +struct symbol *op_indir(struct node *np) { } -void op_minus(struct node *np) +struct symbol *op_minus(struct node *np) { } -void op_plus(struct node *np) +struct symbol *op_plus(struct node *np) { } -void op_cpl(struct node *np) +struct symbol *op_cpl(struct node *np) { } -void op_neg(struct node *np) +struct symbol *op_neg(struct node *np) { } -void op_mul(struct node *np) +struct symbol *op_mul(struct node *np) { } -void op_div(struct node *np) +struct symbol *op_div(struct node *np) { } -void op_mod(struct node *np) +struct symbol *op_mod(struct node *np) { } -void op_add(struct node *np) +struct symbol *op_add(struct node *np) { } -void op_sub(struct node *np) +struct symbol *op_sub(struct node *np) { } -void op_shl(struct node *np) +struct symbol *op_shl(struct node *np) { } -void op_shr(struct node *np) +struct symbol *op_shr(struct node *np) { } -void op_lt(struct node *np) +struct symbol *op_lt(struct node *np) { } -void op_gt(struct node *np) +struct symbol *op_gt(struct node *np) { } -void op_ge(struct node *np) +struct symbol *op_ge(struct node *np) { } -void op_le(struct node *np) +struct symbol *op_le(struct node *np) { } -void op_eq(struct node *np) +struct symbol *op_eq(struct node *np) { } -void op_ne(struct node *np) +struct symbol *op_ne(struct node *np) { } -void op_band(struct node *np) +struct symbol *op_band(struct node *np) { } -void op_bxor(struct node *np) +struct symbol *op_bxor(struct node *np) { } -void op_bor(struct node *np) +struct symbol *op_bor(struct node *np) { } -void op_and(struct node *np) +struct symbol *op_and(struct node *np) { } -void op_or(struct node *np) +struct symbol *op_or(struct node *np) { } -void op_tern(struct node *np) +struct symbol *op_tern(struct node *np) { } -void op_assign(struct node *np) +struct symbol *op_assign(struct node *np) { } -void op_a_mul(struct node *np) +struct symbol *op_a_mul(struct node *np) { } -void op_a_div(struct node *np) +struct symbol *op_a_div(struct node *np) { } -void op_a_mod(struct node *np) +struct symbol *op_a_mod(struct node *np) { } -void op_a_add(struct node *np) +struct symbol *op_a_add(struct node *np) { } -void op_a_sub(struct node *np) +struct symbol *op_a_sub(struct node *np) { } -void op_a_shl(struct node *np) +struct symbol *op_a_shl(struct node *np) { } -void op_a_shr(struct node *np) +struct symbol *op_a_shr(struct node *np) { } -void op_a_and(struct node *np) +struct symbol *op_a_and(struct node *np) { } -void op_a_xor(struct node *np) +struct symbol *op_a_xor(struct node *np) { } -void op_a_or(struct node *np) +struct symbol *op_a_or(struct node *np) { } diff --git a/syntax.h b/syntax.h @@ -7,7 +7,7 @@ extern unsigned char nested_level; struct node; struct symbol; -typedef void nodeop(struct node *np); +typedef struct symbol *nodeop(struct node *np); extern void compound(void); extern struct node *expr(void);