Compiler can compile simple nested expressions and function calls.
The generated code can be called from C, and values can be passed between.
diff --git a/src/lisp/lisp.c b/src/lisp/lisp.c
index ac10eab..6a008f1 100644
--- a/src/lisp/lisp.c
+++ b/src/lisp/lisp.c
@@ -490,18 +490,15 @@
{
int i = 0;
- FOREACH (item, v)
- {
- (void)item;
+ for ( ; !nilp (v); v = cdr (v) )
i++;
- }
return i;
}
value_t elt (value_t v, int index)
{
- for ( int = 0; i < index; i++ )
+ for ( int i = 0; i < index; i++ )
{
v = cdr (v);
}