Issue #331 - Prevent syntax error during eval

Prevent an unquoted symbol from throwing a syntax error when evaluating a define-record-type form. Note there are still other issues with creating a record type in the interpreter at this time.
This commit is contained in:
Justin Ethier 2019-08-05 14:09:14 -04:00
parent 1edb877c5f
commit ec25eddc28

View file

@ -1921,9 +1921,7 @@
,parent ,parent
',(map car fields))) ',(map car fields)))
;; predicate ;; predicate
(,_define ,pred (,(rename 'make-type-predicate) (,_define ,pred (,(rename 'make-type-predicate) 0 ,name))
,pred ;(symbol->string pred) ;(identifier->symbol pred))
,name))
;; fields ;; fields
,@(map (lambda (f) ,@(map (lambda (f)
(and (pair? f) (pair? (cdr f)) (and (pair? f) (pair? (cdr f))