Very small progress.
This commit is contained in:
parent
637d78fb1b
commit
7cd2cbf785
|
@ -80,8 +80,8 @@ bool equal( struct cons_pointer a, struct cons_pointer b ) {
|
|||
&& ( equal( cell_a->payload.string.cdr,
|
||||
cell_b->payload.string.cdr )
|
||||
|| ( end_of_string( cell_a->payload.string.cdr )
|
||||
&& end_of_string( cell_b->payload.string.
|
||||
cdr ) ) );
|
||||
&& end_of_string( cell_b->payload.
|
||||
string.cdr ) ) );
|
||||
break;
|
||||
case INTEGERTV:
|
||||
result =
|
||||
|
|
|
@ -103,6 +103,7 @@ int main( int argc, char *argv[] ) {
|
|||
bind_function( "*", &lisp_multiply );
|
||||
bind_function( "-", &lisp_subtract );
|
||||
bind_function( "/", &lisp_divide );
|
||||
bind_function( "=", &lisp_equal );
|
||||
|
||||
/*
|
||||
* primitive special forms
|
||||
|
|
|
@ -390,8 +390,10 @@ lisp_eval( struct stack_frame *frame, struct cons_pointer env ) {
|
|||
internedp( frame->arg[0], env );
|
||||
if ( nilp( canonical ) ) {
|
||||
struct cons_pointer message =
|
||||
c_cons(
|
||||
c_string_to_lisp_string
|
||||
( "Attempt to take value of unbound symbol." );
|
||||
( "Attempt to take value of unbound symbol." ),
|
||||
frame->arg[0]);
|
||||
result = lisp_throw( message, frame );
|
||||
} else {
|
||||
result = c_assoc( canonical, env );
|
||||
|
|
|
@ -132,8 +132,8 @@ void print( FILE * output, struct cons_pointer pointer ) {
|
|||
case LAMBDATV:
|
||||
print( output, make_cons( c_string_to_lisp_symbol( "lambda" ),
|
||||
make_cons( cell.payload.lambda.args,
|
||||
cell.payload.
|
||||
lambda.body ) ) );
|
||||
cell.payload.lambda.
|
||||
body ) ) );
|
||||
break;
|
||||
case NILTV:
|
||||
fwprintf( output, L"nil" );
|
||||
|
@ -141,8 +141,8 @@ void print( FILE * output, struct cons_pointer pointer ) {
|
|||
case NLAMBDATV:
|
||||
print( output, make_cons( c_string_to_lisp_symbol( "nlambda" ),
|
||||
make_cons( cell.payload.lambda.args,
|
||||
cell.payload.
|
||||
lambda.body ) ) );
|
||||
cell.payload.lambda.
|
||||
body ) ) );
|
||||
break;
|
||||
case READTV:
|
||||
fwprintf( output, L"(Input stream)" );
|
||||
|
|
Loading…
Reference in a new issue