diff --git a/Makefile b/Makefile index 4906fb3..85c2d5c 100755 --- a/Makefile +++ b/Makefile @@ -20,7 +20,6 @@ BUILD_DIR = build SRC_DIR = src OBJS = $(patsubst $(SRC_DIR)/%.c,build-tmp/%.o,$(wildcard $(SRC_DIR)/*.c)) -OBJS += build-tmp/y.tab.o build-tmp/lex.yy.o all: | builddir yacc build builddir2 diff --git a/src/parse_utils.c b/src/parse_utils.c index 6e0292b..a298c3e 100644 --- a/src/parse_utils.c +++ b/src/parse_utils.c @@ -106,7 +106,7 @@ FnSig bi_sig[] = { Statement *make_operation(i32 type, i32 extrainf, char *name, i32 nparam, Statement *param, ...){ - printf("make_operation: ", name); + printf("make_operation: "); Statement *stat = &stack->statements[stack->curr_statement++]; if(nparam) stat->children = malloc(sizeof(void*)*nparam); @@ -136,7 +136,7 @@ Statement *make_operation(i32 type, i32 extrainf, char *name, i32 nparam, va_list prm; va_start(prm, param); - for(int i = 0; i < fnsig->n_param; i++){ + for(int i = 0; i < nparam; i++){ Statement *prm_n = va_arg(prm, Statement*); stat->children[stat->child_n++] = prm_n; stack->curr_statement++; diff --git a/src/parser.y b/src/parser.y index 38a5626..765fd96 100644 --- a/src/parser.y +++ b/src/parser.y @@ -67,7 +67,7 @@ stmt: } | '(' WHILE stmt stmt_list ')' {} - | '(' FN fn_args stmt_list ')' + | '(' FN '(' fn_args ')' stmt_list ')' {} | '(' GTEQ stmt stmt ')' {}