Fixed bug in convert-list-form
parent
ec79b7823f
commit
df4023b6a7
|
@ -61,15 +61,15 @@ PRIVATE>
|
||||||
[ swap localize-body convert-body ] dipd pop-locals swap <lambda> ;
|
[ swap localize-body convert-body ] dipd pop-locals swap <lambda> ;
|
||||||
|
|
||||||
: convert-list-form ( lisp-form -- quot )
|
: convert-list-form ( lisp-form -- quot )
|
||||||
dup first
|
dup first dup lisp-symbol? [ name>>
|
||||||
{ { [ dup "if" <lisp-symbol> equal? ] [ drop convert-if ] }
|
{ { "lambda" [ convert-lambda ] }
|
||||||
{ [ dup "begin" <lisp-symbol> equal? ] [ drop convert-begin ] }
|
{ "if" [ convert-if ] }
|
||||||
{ [ dup "cond" <lisp-symbol> equal? ] [ drop convert-cond ] }
|
{ "begin" [ convert-begin ] }
|
||||||
{ [ dup "lambda" <lisp-symbol> equal? ] [ drop convert-lambda ] }
|
{ "cond" [ convert-cond ] }
|
||||||
[ drop convert-general-form ]
|
[ drop convert-general-form ]
|
||||||
} cond ;
|
} case ] [ drop convert-general-form ] if ;
|
||||||
|
|
||||||
: convert-form ( lisp-form -- quot )
|
: convert-form ( lisp-form -- quot )
|
||||||
{ { [ dup [ sequence? ] [ number? not ] bi and ] [ convert-list-form ] }
|
{ { [ dup vector? ] [ convert-list-form ] }
|
||||||
[ [ , ] [ ] make ]
|
[ [ , ] [ ] make ]
|
||||||
} cond ;
|
} cond ;
|
Loading…
Reference in New Issue