small revision of "qml-file.lisp" (add newline after FORMAT)

This commit is contained in:
polos 2017-03-05 17:03:10 +01:00
parent aecb1bd308
commit ff0a20d421
4 changed files with 10 additions and 6 deletions

View file

@ -42,7 +42,7 @@
"color: 'black'"
(let ((n 0))
(dolist (char *chars*)
(qml "Image { id: img~A; source: 'img/~A.png' }~%"
(qml "Image { id: img~A; source: 'img/~A.png' }"
(incf n)
(image-of-char char))))
(qml "SequentialAnimation"
@ -59,11 +59,11 @@
(let ((target 0))
(mapc (lambda (from-xy to-xy)
(incf target)
(qml "PalindromeAnimation { target: img~A; property: 'x'; from: ~A; to: ~A } "
(qml "PalindromeAnimation { target: img~A; property: 'x'; from: ~A; to: ~A }"
target
(* 31 (first from-xy))
(* 31 (first to-xy)))
(qml "PalindromeAnimation { target: img~A; property: 'y'; from: ~A; to: ~A }~%"
(qml "PalindromeAnimation { target: img~A; property: 'y'; from: ~A; to: ~A }"
target
(* 31 (second from-xy))
(* 31 (second to-xy))))

View file

@ -19,7 +19,9 @@
(defmacro qml (first &body body)
(if (find #\~ first)
`(format s ,first ,@body)
`(progn
(format s ,first ,@body)
(terpri s))
(let ((open-close (and (upper-case-p (char first 0))
(not (find #\{ first)))))
(if body

View file

@ -14,7 +14,7 @@
(let ((num 0))
(mapc (lambda (char xy)
(incf num)
(qml "PalindromeImage { objectName: 'img~A'; source: 'img/~A.png'; x: ~D; y: ~D }~%"
(qml "PalindromeImage { objectName: 'img~A'; source: 'img/~A.png'; x: ~D; y: ~D }"
num
(image-of-char char)
(* 31 (first xy))

View file

@ -19,7 +19,9 @@
(defmacro qml (first &body body)
(if (find #\~ first)
`(format s ,first ,@body)
`(progn
(format s ,first ,@body)
(terpri s))
(let ((open-close (and (upper-case-p (char first 0))
(not (find #\{ first)))))
(if body