diff options
Diffstat (limited to 'src/lib/eval.c')
| -rw-r--r-- | src/lib/eval.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/lib/eval.c b/src/lib/eval.c index 07bbedd..f0cdc55 100644 --- a/src/lib/eval.c +++ b/src/lib/eval.c @@ -3,7 +3,17 @@ struct aplwc_value * eval_line(struct aplwc_line *line) { - assert(line->aplwc->last_error == APLWC_OK); - line->aplwc->last_error = APLWC_NOT_YET_IMPLEMENTED; - return NULL; + struct aplwc_value *value; + struct aplwc *aplwc; + + aplwc = line->aplwc; + assert(aplwc->last_error == APLWC_OK); + + value = memory_alloc_aplwc_value(&aplwc->memory); + if(value == NULL) + aplwc->last_error = APLWC_OUT_OF_MEMORY; + value->aplwc = aplwc; + value->tag = VALUE_NULL; + + return value; } |