Commit graph

6 commits

Author SHA1 Message Date
0384875ef3 values: Split lists into read-only lists and editable lists
This is analogous to dictionaries and ensures that no circular references
can be created when using the exported API in apfl.h.

This also changes apfl_value_copy into apfl_value_incref to better reflect
what it does and to reflect that it is no longer an operation that can
fail.
2022-01-04 23:11:38 +01:00
b29219af25 Make strings in apfl_value refcounted
This avoids copying the string every time we pass it around. Not too
important right now, but will become important onve we're able to evaluate
more complex expressions.
2022-01-02 17:55:44 +01:00
649607ce50 Start work on evaluating expressions
Right now we're only evaluating bool/nil/number/string/list literals, but
it's a start :).
2022-01-02 17:22:22 +01:00
92dc89d3ca Move {=>apfl_}print_indented out of expr.c
We'll soon need it elsewhere.
2022-01-02 16:53:26 +01:00
af33887131 internal: Fix list deinitialization 2021-12-15 21:47:17 +01:00
d094ed7bd5 Initial commit 2021-12-15 21:47:17 +01:00