diff options
| author | peter <peter@pmikkelsen.com> | 2026-08-22 17:25:54 +0000 |
|---|---|---|
| committer | peter <peter@pmikkelsen.com> | 2026-08-22 17:25:54 +0000 |
| commit | dc9b7f961d1c5f39a07085c9dbad8d94bbacde70 (patch) | |
| tree | 5f22d024bfc2d8813947c1f1700114df9e01a287 /src/lib/eval.c | |
| parent | efe230205f254fc5369b53d3de2841723beb6ff8 (diff) | |
Small set of changes to make the tests pass - meaning the scanner understands the code, not much else
FossilOrigin-Name: d21c4a18581a61da466c0fbfdf73881bec55ea01091ef67abda1d10e17f8d358
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; } |