Merge branch 'josh_11_7' of gitlab.cs.wallawalla.edu:lustje/language-interpreter-lab

This commit is contained in:
vel 2024-11-15 10:09:23 -08:00
commit 1e4c127762
Signed by: velvox
GPG Key ID: 59D9762F674151DF
2 changed files with 6 additions and 1 deletions

View File

@ -327,6 +327,9 @@ void decl_evaluate(struct decl *d) {
if (!d)
return;
printf("decl_evaluate\n");
if (d->name->kind == EXPR_NAME && d->value->kind == EXPR_ARRAY) {
struct expr *e = expr_sub_evaluate(d->value);
scope_bind(d->name->name, e);

View File

@ -35,7 +35,9 @@ typedef enum {
EXPR_SUBSCRIPT,
EXPR_SUBTRACT,
EXPR_NULL,
EXPR_CUSTOM_FUNCTION
EXPR_CUSTOM_FUNCTION,
EXPR_OCCURS,
EXPR_VALUE
} expr_t;
struct expr {