diff options
Diffstat (limited to 'src/lib/aplwc_internal.h')
| -rw-r--r-- | src/lib/aplwc_internal.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/aplwc_internal.h b/src/lib/aplwc_internal.h index 833a351..4ad30f8 100644 --- a/src/lib/aplwc_internal.h +++ b/src/lib/aplwc_internal.h @@ -53,8 +53,17 @@ struct token_list { struct token tokens[1]; }; +enum value_tag { + VALUE_NUMBER +}; + +struct aplwc_value { + struct aplwc *aplwc; + enum value_tag tag; +}; + /* eval.c */ -void eval_line(struct aplwc_line *); +struct aplwc_value *eval_line(struct aplwc_line *); /* memory.c */ struct memory memory_init(uint8_t *, size_t); @@ -62,10 +71,12 @@ struct aplwc *memory_alloc_aplwc(struct memory *); struct aplwc_line *memory_alloc_aplwc_line(struct memory *); struct string *memory_alloc_string(struct memory *, size_t); struct token_list *memory_alloc_token_list(struct memory *, size_t); +struct aplwc_value *memory_alloc_aplwc_value(struct memory *); void memory_free_aplwc(struct memory *, struct aplwc *); void memory_free_aplwc_line(struct memory *, struct aplwc_line *); void memory_free_string(struct memory *, struct string *); void memory_free_token_list(struct memory *, struct token_list *); +void memory_free_aplwc_value(struct memory *, struct aplwc_value *); /* string.c */ struct string *chars_to_string(struct aplwc *, const char *); |