Commit e7e018cf authored by Vladimir Sedach's avatar Vladimir Sedach
Browse files

Fixed %/REM. Thanks to Daniel Gackle for the bug report.

parent be0cde84
......@@ -65,23 +65,21 @@ is output to the OUTPUT-STREAM stream."
(defun-js symbol-to-js symbol-to-js-string (symbol)
(symbol-to-js-string symbol))
(defpsmacro slot-value (&rest args)
(warn-deprecated 'slot-value 'getprop)
`(getprop ,@args))
(defpsmacro === (&rest args)
(warn-deprecated '=== 'eql)
`(eql ,@args))
(defpsmacro == (&rest args)
(warn-deprecated '== 'equal)
`(equal ,@args))
(defmacro defmacro/ps (name args &body body)
(warn-deprecated 'defmacro/ps 'defmacro+ps)
`(progn (defmacro ,name ,args ,@body)
(import-macros-from-lisp ',name)))
(defmacro defpsmacro-deprecated (old new)
`(defpsmacro ,old (&rest args)
(warn-deprecated ',old ',new)
(cons ',new args)))
(defpsmacro-deprecated slot-value getprop)
(defpsmacro-deprecated === eql)
(defpsmacro-deprecated == equal)
(defpsmacro-deprecated % rem)
(defpsmacro labeled-for (label init-forms cond-forms step-forms &rest body)
(warn-deprecated 'labeled-for 'label)
`(label ,label (for ,init-forms ,cond-forms ,step-forms ,@body)))
......@@ -57,6 +57,7 @@
#:slot-value
#:compile-script
#:defmacro/ps
#:%
#:==
#:===
#:labeled-for
......@@ -98,7 +99,7 @@
#:*
#:/
#:%
#:rem
#:+
#:-
#:<
......
......@@ -163,7 +163,7 @@ vice-versa.")
(defprinter js:post-- (x)
(ps-print x)"--")
(defprinter (js:+ js:- js:* js:/ js:&& js:\|\| js:& js:\| js:-= js:+= js:*= js:/= js:^ js:= js:== js:=== js:!== js:in js:!= js:> js:>= js:< js:<=)
(defprinter (js:+ js:- js:* js:/ js:% js:&& js:\|\| js:& js:\| js:-= js:+= js:*= js:/= js:^ js:= js:== js:=== js:!== js:in js:!= js:> js:>= js:< js:<=)
(&rest args)
(loop for (arg . remaining) on args do
(print-op-argument op arg)
......
......@@ -17,6 +17,7 @@
- js:-
* js:*
/ js:/
rem js:%
and js:&&
or js:\|\|
......
......@@ -1692,3 +1692,7 @@ x();")
(test-ps-js vector-literal
#(1 2 3)
"[1, 2, 3];")
(test-ps-js rem1
(+ 1 (rem 2 (+ 3 4)))
"1 + 2 % (3 + 4);")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment