aboutsummaryrefslogtreecommitdiffstats
path: root/webstats/server.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'webstats/server.lisp')
-rw-r--r--webstats/server.lisp8
1 files changed, 8 insertions, 0 deletions
diff --git a/webstats/server.lisp b/webstats/server.lisp
index 148f0aa..4fecc1f 100644
--- a/webstats/server.lisp
+++ b/webstats/server.lisp
@@ -9,6 +9,14 @@
(in-package :webstats-js)
(setf *js-target-version* "1.9")
+(ps::define-statement-operator for-of ((var iterable) &rest body)
+ `(ps-js::for-of ,(ps::compile-expression var)
+ ,(ps::compile-expression iterable)
+ ,(ps::compile-loop-body (list var) body)))
+
+(ps::defprinter ps-js::for-of (var object body-block)
+ "for (const "(ps::ps-print var)" of "(ps::ps-print object)") "
+ (ps::ps-print body-block))
(in-package :webstats)
(overlord:set-package-base "/home/titan/dev/scratch/webstats/")