diff options
| author | Keith Packard <keithp@keithp.com> | 2016-11-09 09:14:50 -0800 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2017-02-20 11:16:50 -0800 | 
| commit | 794718abc62f4610495fe2bd535a2b67bc46573c (patch) | |
| tree | ce2c16e370d2df6942c1e6a87c40b748eb20b193 /src/lisp/ao_lisp_frame.c | |
| parent | cb4cdb115ad83ae0d75eb58e68f561d20279f027 (diff) | |
altos/lisp: working on lexical scoping
Not working yet
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/lisp/ao_lisp_frame.c')
| -rw-r--r-- | src/lisp/ao_lisp_frame.c | 21 | 
1 files changed, 21 insertions, 0 deletions
| diff --git a/src/lisp/ao_lisp_frame.c b/src/lisp/ao_lisp_frame.c index 8791c4de..7978f20a 100644 --- a/src/lisp/ao_lisp_frame.c +++ b/src/lisp/ao_lisp_frame.c @@ -100,6 +100,27 @@ const struct ao_lisp_type ao_lisp_frame_type = {  	.move = frame_move  }; +void +ao_lisp_frame_print(ao_poly p) +{ +	struct ao_lisp_frame	*frame = ao_lisp_poly_frame(p); +	int			f; + +	printf ("{"); +	if (frame) { +		for (f = 0; f < frame->num; f++) { +			if (f != 0) +				printf(", "); +			ao_lisp_poly_print(frame->vals[f].atom); +			printf(" = "); +			ao_lisp_poly_print(frame->vals[f].val); +		} +		if (frame->next) +			ao_lisp_poly_print(frame->next); +	} +	printf("}"); +} +  ao_poly *  ao_lisp_frame_ref(struct ao_lisp_frame *frame, ao_poly atom)  { | 
