for arrays, ast_value will contain several ir_values, ir_v will point to the [0] element

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-11-11 10:51:40 +01:00
parent 00a28e48ee
commit 62d062f860
2 changed files with 5 additions and 1 deletions

4
ast.c
View file

@ -312,7 +312,9 @@ ast_value* ast_value_new(lex_ctx ctx, const char *name, int t)
self->uses = 0;
memset(&self->constval, 0, sizeof(self->constval));
self->ir_v = NULL;
self->ir_v = NULL;
self->ir_values = NULL;
self->ir_value_count = 0;
return self;
}

2
ast.h
View file

@ -162,6 +162,8 @@ struct ast_value_s
size_t uses;
ir_value *ir_v;
ir_value **ir_values;
size_t ir_value_count;
};
ast_value* ast_value_new(lex_ctx ctx, const char *name, int qctype);