Fix constraints

This commit is contained in:
Shinmera 2018-10-07 14:43:14 +02:00
parent 3412f557c6
commit e1e8588220
No known key found for this signature in database
GPG Key ID: E12B14478BE4C922
1 changed files with 8 additions and 4 deletions

View File

@ -70,10 +70,14 @@ if *PRETTY* is non-NIL.")
((NIL))
(:combine
(destructuring-bind (combiner &rest parts) (rest constraint)
(write-sheet-object (car (first parts)) (cdr (first parts)) stream)
(dolist (part (rest parts))
(format stream combiner)
(write-sheet-object (car part) (cdr part) stream))))
(flet ((%wr (part)
(if (consp part)
(write-sheet-object (car part) (cdr part) stream)
(write-sheet-object :constraint (list :literal part) stream))))
(%wr (first parts))
(dolist (part (rest parts))
(format stream combiner)
(%wr part)))))
(:attribute
(destructuring-bind (attr comp val) (rest constraint)
(format stream "[")