##// END OF EJS Templates
100% parser, 100% macros, 50% intrinsics, 10% api, 0% misc
100% parser, 100% macros, 50% intrinsics, 10% api, 0% misc

File last commit:

r1:de781984 default
r1:de781984 default
Show More
api.ps
39 lines | 855 B | application/postscript | PostScriptLexer
(in-package sugar-qsp)
;;; API deals with DOM manipulation and some bookkeeping for the
;;; intrinsics, namely variables
;;; API is an implementation detail and has no QSP documentation. It
;;; doesn't call intrinsics
(setf (root api) (ps:create))
;;; Function calls
(defm (root api init-args) (args)
(dotimes (i (length args))
(if (numberp (elt args i))
(set (var args i) (elt args i))
(set (var $args i) (elt args i)))))
(defm (root api get-result) ()
(if (not (equal "" (var $result 0)))
(var $result 0)
(var result 0)))
;;; Text windows
(defm (root api add-text) ())
(defm (root api get-text) ())
(defm (root api clear-text) ())
;;; Actions
(defm (root api add-act) ())
(defm (root api clear-act) ())
;;; Variables
(defm (root api get-var) ())
(defm (root api set-var) ())
(defm (root api kill-var) ())