Parenscript
Parenscript copied to clipboard
ES classes, arrow functions, and a bug. Oh My!
2 Commits:
- A simple bug.
lambda-wrap
ends up with a lexical binding for*ps-gensym-counter*
because thedefvar
appears later in the file. -
es-class
and=>
are the more interesting second commit.
The new es-class
parenscript form will output ecmascript classes with support for member/static-member assignment from within the body (some of which is post es-2015, but it only appears in the generated code if you use it)
(ps:ps
(es-class HelloWorld ()
(defun constructor ()
(format t "hello?"))
(setf id
(=> (x) x))
(static
(setf proto foo))))
class HelloWorld {
constructor () {
return format(true, 'hello?');
}
id = (x) => {
return x;
}
static proto = foo
};