Show More
@@ -230,6 +230,10 b'' | |||||
230 | :do (when (@ v :selected) |
|
230 | :do (when (@ v :selected) | |
231 | (return-from selobj (@ v :name))))) |
|
231 | (return-from selobj (@ v :name))))) | |
232 |
|
232 | |||
|
233 | (defun unsel () | |||
|
234 | (loop :for (k v) :of *objs | |||
|
235 | :do (setf (@ v :selected) nil))) | |||
|
236 | ||||
233 | ;;; 16menu |
|
237 | ;;; 16menu | |
234 |
|
238 | |||
235 | (defun menu (menu-name) |
|
239 | (defun menu (menu-name) |
@@ -56,7 +56,7 b'' | |||||
56 | (alexandria:read-file-into-string filename)) |
|
56 | (alexandria:read-file-into-string filename)) | |
57 | (p:esrap-parse-error (e) |
|
57 | (p:esrap-parse-error (e) | |
58 | (format t "~A~%" e) |
|
58 | (format t "~A~%" e) | |
59 | (uiop:quit 1)))) |
|
59 | (throw :terminate nil)))) | |
60 |
|
60 | |||
61 | (defun report-error (fmt &rest args) |
|
61 | (defun report-error (fmt &rest args) | |
62 | (format t "ERROR: ~A~%" (apply #'format nil fmt args)) |
|
62 | (format t "ERROR: ~A~%" (apply #'format nil fmt args)) |
@@ -59,11 +59,15 b'' | |||||
59 | (do-binop% (append left-op (list right-op)) rest-ops) |
|
59 | (do-binop% (append left-op (list right-op)) rest-ops) | |
60 | (do-binop% (list operator left-op right-op) rest-ops))))) |
|
60 | (do-binop% (list operator left-op right-op) rest-ops))))) | |
61 |
|
61 | |||
|
62 | (walker:deftransform parser-qspmod mod (&rest args) | |||
|
63 | (list* 'qspmod (mapcar #'walker:walk-continue args))) | |||
|
64 | ||||
62 | (defun do-binop (list) |
|
65 | (defun do-binop (list) | |
63 | (destructuring-bind (left-op rest-ops) |
|
66 | (walker:walk 'parser-qspmod | |
64 | list |
|
67 | (destructuring-bind (left-op rest-ops) | |
65 | (do-binop% left-op |
|
68 | list | |
66 | (mapcar #'binop-rest rest-ops)))) |
|
69 | (do-binop% left-op | |
|
70 | (mapcar #'binop-rest rest-ops))))) | |||
67 |
|
71 | |||
68 | (p:defrule line-continuation (and #\_ #\newline) |
|
72 | (p:defrule line-continuation (and #\_ #\newline) | |
69 | (:constant nil)) |
|
73 | (:constant nil)) | |
@@ -109,7 +113,7 b'' | |||||
109 |
|
113 | |||
110 | ;;; Identifiers |
|
114 | ;;; Identifiers | |
111 |
|
115 | |||
112 |
(defparameter *keywords* '(act addlib addobj addqst and arrcomp arrpos arrsize cla clear *clear close clr *clr cls cmdclear cmdclr copyarr |
|
116 | (defparameter *keywords* '(act addlib addobj addqst and arrcomp arrpos arrsize cla clear *clear close clr *clr cls cmdclear cmdclr copyarr countobj curact curacts curloc debug delact dellib delobj desc disablescroll disablesubex dynamic dyneval else elseif end exit for freelib func getobj gosub goto gs gt if iif img *img inclib input instr isnum isplay jump killall killobj killqst killvar lcase len let loc local maintxt max menu mid min mod msecscount msg nl *nl no nosave obj opengame openqst or p *p pl *pl play qspver rand refint replace rgb rnd savegame selact selobj set settimer showacts showinput showobjs showstat stattxt step str strcomp strfind strpos to trim ucase unsel unselect user_text usrtxt val view wait xgoto xgt)) | |
113 |
|
117 | |||
114 | (defun trim-$ (str) |
|
118 | (defun trim-$ (str) | |
115 | (if (char= #\$ (elt str 0)) |
|
119 | (if (char= #\$ (elt str 0)) | |
@@ -517,6 +521,7 b'' | |||||
517 | (countobj t 0 0) |
|
521 | (countobj t 0 0) | |
518 | (getobj t 1 1) |
|
522 | (getobj t 1 1) | |
519 | (selobj t 0 0) |
|
523 | (selobj t 0 0) | |
|
524 | (unsel nil 0 0 "unsel" "unselect") | |||
520 | ;; Menu |
|
525 | ;; Menu | |
521 | (menu nil 1 1) |
|
526 | (menu nil 1 1) | |
522 | ;; Images |
|
527 | ;; Images |
@@ -228,6 +228,12 b'' | |||||
228 | (defpsmacro ! (op1 op2) |
|
228 | (defpsmacro ! (op1 op2) | |
229 | `(not (equal ,op1 ,op2))) |
|
229 | `(not (equal ,op1 ,op2))) | |
230 |
|
230 | |||
|
231 | (defpsmacro qspmod (&rest ops) | |||
|
232 | (case (length ops) | |||
|
233 | (1 (first ops)) | |||
|
234 | (2 `(mod ,@ops)) | |||
|
235 | (t `(mod ,(first ops) (qspmod ,@(rest ops)))))) | |||
|
236 | ||||
231 | ;;; 4code |
|
237 | ;;; 4code | |
232 |
|
238 | |||
233 | (defpsmacro exec (&body body) |
|
239 | (defpsmacro exec (&body body) | |
@@ -244,7 +250,10 b'' | |||||
244 |
|
250 | |||
245 | (defpsmacro qspcond (&rest clauses) |
|
251 | (defpsmacro qspcond (&rest clauses) | |
246 | `(cond ,@(loop :for clause :in clauses |
|
252 | `(cond ,@(loop :for clause :in clauses | |
247 |
: |
|
253 | :for f := (if (eq 'txt2web::else (first clause)) | |
|
254 | 't | |||
|
255 | (first clause)) | |||
|
256 | :collect (list f | |||
248 | `(tagbody |
|
257 | `(tagbody | |
249 | ,@(rest clause)))))) |
|
258 | ,@(rest clause)))))) | |
250 |
|
259 |
General Comments 0
You need to be logged in to leave comments.
Login now