This commit is contained in:
attilavs2 2025-03-08 12:24:32 +01:00
parent 61290a18b9
commit c5c58f07bc
3 changed files with 3 additions and 4 deletions

View file

@ -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

View file

@ -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++;

View file

@ -67,7 +67,7 @@ stmt:
}
| '(' WHILE stmt stmt_list ')'
{}
| '(' FN fn_args stmt_list ')'
| '(' FN '(' fn_args ')' stmt_list ')'
{}
| '(' GTEQ stmt stmt ')'
{}