Red Daly [Fri, 20 Jul 2007 20:35:32 +0000 (20:35 +0000)]
eval-when special form
Added the EVAL-WHEN special form to the Parenscript language. It
works similarly to the EVAL-WHEN form in Lisp. It has the following
form:
(eval-when body-forms-language? (situation*) body-forms*)
SITUATION is either :compile-toplevel or :execute.
BODY-FORMS-LANGUAGE is optional and either :parenscript or :lisp. It
defaults to :lisp when :COMPILE-TOPLEVEL is specified and :parenscript
when :EXECUTE is specified.
Parenscript's EVAL-WHEN is relevant when loading toplevel forms,
either from Parenscript files or from within Lisp.
Red Daly [Fri, 20 Jul 2007 00:34:31 +0000 (00:34 +0000)]
renaming and refactoring
Changed the names of many functions and macros to get rid of the
symbols with "js" in them--its not Javascript, it's Parenscript! Most
of those symbols were renamed with "script" replacing "js".
Also changed the main compilation interfaces to use the function
COMPILE-SCRIPT and the macro SCRIPT from JS-COMPILE and JS
respectively.
Additionally, the first steps of the package system are included (with
the addition of a the SCRIPT-PACKAGE and COMPILATION-ENVIRONMENT
classes). These are integrated into the current compiler, though they
probably break a few "traditional" serialization methods, specifically
because macro and special form names are stored as symbols rather than
strings and EQL comparisons are used rather than STRING-EQUAL
comparisons of the strings.
I have also split parser.lisp into parser.lisp and macrology.lisp.
Parser.lisp contains mechanisms for parsing Parenscript given an input
s-expression while macrology.lisp contains language definitions that
make use of the parsing mechanisms.
All tests now pass, though the documentation has gone slightly out of
date with the symbol renaming. This will be fixed shortly. More
tests and functionality need to be added to make the current
Parenscript compatable with the older semantics (as dicussed,
comparing macro/special form names based on their string values is the
main thing).
Vladimir Sedach [Mon, 16 Jul 2007 18:13:40 +0000 (18:13 +0000)]
Re-introduced 'with' special form.
(it got lost somewhere along the way)
Vladimir Sedach [Sat, 14 Jul 2007 00:28:54 +0000 (00:28 +0000)]
Improved formatting/whitespace removing code in tests. Added slot-value-setf test.
Now all ps-tests pass.
Vladimir Sedach [Fri, 13 Jul 2007 21:11:09 +0000 (21:11 +0000)]
Added documentation of new macro facilities.
Viktor Leis [Thu, 12 Jul 2007 23:19:07 +0000 (23:19 +0000)]
Added warnings when attempting to use reserved Javascript keywords as variable or functions names.
Signed-off-by: Vladimir Sedach <vsedach@gmail.com>
Vladimir Sedach [Tue, 10 Jul 2007 21:18:21 +0000 (21:18 +0000)]
Added oddp, evenp utility functions, added explanatory error message to js-compile-to-symbol.
Vladimir Sedach [Tue, 3 Jul 2007 19:45:56 +0000 (19:45 +0000)]
Improved symbol-to-js to handle more complicated Javascript-like symbols.
Luca Capello [Tue, 3 Jul 2007 18:29:37 +0000 (18:29 +0000)]
Factor out misc tests into their own test file.
Signed-off-by: Vladimir Sedach <vsedach@gmail.com>
Red Daly [Mon, 2 Jul 2007 21:43:07 +0000 (21:43 +0000)]
character encoding fixes in test.lisp
Luca Capello [Sun, 1 Jul 2007 17:04:19 +0000 (17:04 +0000)]
t/test.lisp: typo, remove colon at line 82
Luca Capello [Sun, 1 Jul 2007 17:00:21 +0000 (17:00 +0000)]
add an (eval-when ...) when defining a test suite
Vladimir Sedach [Thu, 28 Jun 2007 19:28:23 +0000 (19:28 +0000)]
Added divisors to ceiling, floor, round.
Vladimir Sedach [Tue, 26 Jun 2007 23:13:07 +0000 (23:13 +0000)]
Added Red Daly to contributors file.
Red Daly [Tue, 26 Jun 2007 21:30:27 +0000 (21:30 +0000)]
js.lisp breakup
Broke the js.lisp file up into several three files: source-model.lisp,
js-translation.lisp, and parser.lisp.
source-model.lisp: class definitions that correspond to the Javascript
AST. (defjsclass forms for the most part)
js-translation.lisp: functions for converting AST objects to
Javascript source code
parser.lisp: macro definitions and the mechanisms for processing
Parenscript forms into AST objects.
See also: http://common-lisp.net/pipermail/parenscript-devel/2007-June/000035.html
Red Daly [Tue, 26 Jun 2007 17:43:20 +0000 (17:43 +0000)]
package rename
Vladimir Sedach [Tue, 26 Jun 2007 19:24:52 +0000 (19:24 +0000)]
Refactored macro-related code, changed "compiler macros" to special forms, added separate namespaces for macros and symbol-macros, added full macro lambda lists to macrolet, added support for docstrings to defjsmacro.
Vladimir Sedach [Mon, 25 Jun 2007 19:42:00 +0000 (19:42 +0000)]
Added contributors file.
Vladimir Sedach [Mon, 25 Jun 2007 19:17:27 +0000 (19:17 +0000)]
Added js-expander.el
Vladimir Sedach [Fri, 22 Jun 2007 20:46:40 +0000 (20:46 +0000)]
Added defmacro to ParenScript.
Vladimir Sedach [Thu, 21 Jun 2007 17:54:16 +0000 (17:54 +0000)]
Renamed with-timeout to do-set-timeout, added ignore errors.
Thanks to: John Fremlin <john@fremlin.org>
Vladimir Sedach [Wed, 20 Jun 2007 20:48:00 +0000 (20:48 +0000)]
Added defmacro+js
Vladimir Sedach [Tue, 19 Jun 2007 21:34:16 +0000 (21:34 +0000)]
Exported defmacro/js
Vladimir Sedach [Tue, 19 Jun 2007 19:37:48 +0000 (19:37 +0000)]
Added js-utils file.
Vladimir Sedach [Tue, 19 Jun 2007 18:44:51 +0000 (18:44 +0000)]
Added the defmacro/js macro-defining macro.
Vladimir Sedach [Sat, 16 Jun 2007 04:59:12 +0000 (04:59 +0000)]
Added binary negation ~ operator.
Vladimir Sedach [Fri, 15 Jun 2007 19:29:16 +0000 (19:29 +0000)]
setf slot-value patch
Attila Lendvai [Wed, 6 Jun 2007 19:45:25 +0000 (19:45 +0000)]
Fix: add parens around instanceof to make it work in all situations
Attila Lendvai [Thu, 3 May 2007 14:40:28 +0000 (14:40 +0000)]
Bah, speed up list-to-string by a few factors...
Ray Myers [Fri, 27 Apr 2007 07:39:17 +0000 (07:39 +0000)]
Fix (- 1) and (incf/decf x 5)
Fix the following incorrect (or at least unexpected) behavior in
ParenScript.
(js (- 1)) => "1;"
(js (incf x 5)) => an error
(js (decf x 5)) => an error
Signed-off-by: Attila Lendvai <attila.lendvai@gmail.com>
Attila Lendvai [Wed, 25 Apr 2007 14:58:06 +0000 (14:58 +0000)]
Note in the warning that we are redefining a _js_ compiler macro
Attila Lendvai [Mon, 16 Apr 2007 14:36:03 +0000 (14:36 +0000)]
Follow quote changes in SLOT-VALUE
Attila Lendvai [Mon, 16 Apr 2007 13:11:33 +0000 (13:11 +0000)]
Fixed (?) quoting mechanism
(js:js (+ 42 '"FoooFFFOFOFooo")) => "42 + FoooFFFOFOFooo;"
IOW, quote inside a parenscript form means to simply print the quoted
value as-is. Among other things, this is useful for inserting literal
javascript into parenscript. I hope it will not break anything.
Henrik Hjelte [Mon, 15 Jan 2007 14:19:48 +0000 (14:19 +0000)]
conditional attributes in html-generator
Marijn Haverbeke [Wed, 15 Nov 2006 07:38:22 +0000 (07:38 +0000)]
add proper cond construct
Henrik Hjelte [Wed, 22 Nov 2006 19:30:27 +0000 (19:30 +0000)]
Possible to make attributes conditionally rendered with js-html generator
Henrik Hjelte [Wed, 15 Nov 2006 23:54:41 +0000 (23:54 +0000)]
docs updated for new setf optimization
Henrik Hjelte [Wed, 15 Nov 2006 23:41:44 +0000 (23:41 +0000)]
bugfix method-call problem
Henrik Hjelte [Wed, 15 Nov 2006 22:40:45 +0000 (22:40 +0000)]
moretests for method-call (dot-notation) syntax
Henrik Hjelte [Wed, 15 Nov 2006 21:35:02 +0000 (21:35 +0000)]
bugfix commutative plus and minus
Henrik Hjelte [Wed, 15 Nov 2006 20:44:56 +0000 (20:44 +0000)]
tests for some bugs
Reported by: Marijn Haverbeke <marijnh@gmail.com>
Henrik Hjelte [Wed, 15 Nov 2006 19:27:20 +0000 (19:27 +0000)]
asdf test-op added
(asdf:operate 'asdf:test-op :parenscript)
Henrik Hjelte [Wed, 15 Nov 2006 16:46:03 +0000 (16:46 +0000)]
updated pdf manual for new with syntax
Henrik Hjelte [Wed, 15 Nov 2006 16:43:39 +0000 (16:43 +0000)]
build.sh for documentation
Henrik Hjelte [Wed, 15 Nov 2006 16:13:03 +0000 (16:13 +0000)]
Updated documentation to reflect the new syntax of the with statement
Henrik Hjelte [Wed, 15 Nov 2006 15:58:46 +0000 (15:58 +0000)]
make the test escape-sequences-in-string work again
Attila Lendvai [Tue, 3 Oct 2006 13:49:55 +0000 (13:49 +0000)]
Added evenp and oddp
Attila Lendvai [Tue, 3 Oct 2006 13:49:23 +0000 (13:49 +0000)]
Added assert for simple catch forms
Attila Lendvai [Fri, 1 Sep 2006 16:02:49 +0000 (16:02 +0000)]
Killed the feature (js:js* '(let (a b) (+ a b))) => "var a = b; a + b;"
Luca Capello [Mon, 2 Oct 2006 21:55:16 +0000 (21:55 +0000)]
docs/pbook.py: correct faulty check for PDF output
Frank K[_\c3_][_\bc_]ster discovered that docs/pbook.py produces buggy
LaTeX code, a faulty check for PDF output. It doesn't show up if you
only try to create PDF.
But if you want to go the traditional route and produce dvi files (and
from that PostScript and maybe finally again PDF), this will fail and
still produce PDF. The script itself doesn't do that (or rather, it
does that in fact but ignores the output in this first run), but it's
still an uglyness.
Moreover, it's completely useless, because the only package that uses
the information, graphicx, will detect the output format itself (and
in a proper way).
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=390629
Attila Lendvai [Mon, 21 Aug 2006 09:57:00 +0000 (09:57 +0000)]
Use symbol-name for op matching to fix various bugs/surprises
(e.g. `(foo::% 4 2))
Marijn Haverbeke [Fri, 21 Jul 2006 07:50:06 +0000 (07:50 +0000)]
Allow strings and numbers as slot names in object literals
Marco Baringer [Sun, 16 Jul 2006 17:07:49 +0000 (17:07 +0000)]
Drop unused js2.lisp
Attila Lendvai [Sun, 16 Jul 2006 16:47:17 +0000 (16:47 +0000)]
Fix compilation of (.call (lambda () ...) arg1 ...), add missing ()'s around the lambda
Attila Lendvai [Sun, 16 Jul 2006 16:46:30 +0000 (16:46 +0000)]
Fix compilation of ((foo) bar) -> foo()(bar)
Attila Lendvai [Sun, 16 Jul 2006 16:39:46 +0000 (16:39 +0000)]
Fixed js-with
WARNING: this involves syntax change
Previously the syntax of with was this:
(with (object)
body)
now it's:
(with object
body)
It was also broken when 'object' was an expression...
Henrik Hjelte [Sat, 15 Jul 2006 20:13:44 +0000 (20:13 +0000)]
bugfix sometimes missing semicolons when joining js-body
Attila Lendvai [Tue, 11 Jul 2006 21:17:50 +0000 (21:17 +0000)]
Rebind var in dolist to make also clisp happy
import-macros-from-lisp was broken due to this.
Henrik Hjelte [Tue, 11 Jul 2006 13:47:05 +0000 (13:47 +0000)]
regex patch
Suggested by: Lou Vanek <vanek@acd.net>
Henrik Hjelte [Tue, 11 Jul 2006 10:09:52 +0000 (10:09 +0000)]
documentation updated about dollar char
Henrik Hjelte [Tue, 11 Jul 2006 08:49:15 +0000 (08:49 +0000)]
Made ref2test work with cl-launch
Attila Lendvai [Fri, 7 Jul 2006 22:37:11 +0000 (22:37 +0000)]
Fix screwed-up asd file
Attila Lendvai [Fri, 7 Jul 2006 15:18:26 +0000 (15:18 +0000)]
Fixed instanceof
Attila Lendvai [Fri, 7 Jul 2006 15:13:21 +0000 (15:13 +0000)]
Added src/lib/functional.lisp
This is a first element of an parenscript library. The contents of
this file is to be compiled with parenscript and the result js
included in the host environment in one way or another.
Attila Lendvai [Fri, 7 Jul 2006 15:12:31 +0000 (15:12 +0000)]
Added :eval-forms-p to compile-parenscript-file
Attila Lendvai [Thu, 6 Jul 2006 22:55:47 +0000 (22:55 +0000)]
Fix the return value of map-into
Attila Lendvai [Thu, 6 Jul 2006 22:51:47 +0000 (22:51 +0000)]
Moved some macros towards the top of the file due to dependencies
In the long run we should cut js.lisp into several files. One dealing
with the basic infrastructure like macro expansion, and the rest
implementing the compiler based on this infrastructure/utilities.
Attila Lendvai [Wed, 5 Jul 2006 18:23:51 +0000 (18:23 +0000)]
Added map and map-into
Attila Lendvai [Wed, 5 Jul 2006 18:20:46 +0000 (18:20 +0000)]
Shortened default gensym constant
Attila Lendvai [Tue, 4 Jul 2006 00:33:15 +0000 (00:33 +0000)]
Don't use loop's initially clause to avoid a clisp bug
For details see: http://sourceforge.net/tracker/index.php?func=detail&aid=
1516684&group_id=1355&atid=101355
Marco Baringer [Sat, 27 May 2006 09:31:59 +0000 (09:31 +0000)]
Make defjsmacro rend's docstring a comment so clisp will stop complaining
Attila Lendvai [Sat, 13 May 2006 09:30:31 +0000 (09:30 +0000)]
Move undefine-js-compiler-macro into an eval-when.
Reported by: William Halliburton <whalliburton@gmail.com>
Attila Lendvai [Fri, 12 May 2006 15:29:54 +0000 (15:29 +0000)]
Added import-macros-from-lisp that bring lisp macros into the js macroexpansion
Marco Baringer [Wed, 10 May 2006 12:54:47 +0000 (12:54 +0000)]
Move compile-parenscript code into a separate file so that it complies cleanly
The problew is that compile-parenscript-file-to-string contains a call
to the macro js:js* this macro needs to be defined before we compile
the compile-parenscript-file-to-string function.
Marco Baringer [Wed, 10 May 2006 12:54:22 +0000 (12:54 +0000)]
Use an explicit asdf:perform :after method instead of :perform (load-op :after ...)
Attila Lendvai [Mon, 8 May 2006 11:08:34 +0000 (11:08 +0000)]
Added compile-parenscript-file
Attila Lendvai [Mon, 8 May 2006 11:06:11 +0000 (11:06 +0000)]
Added character type conversion
Attila Lendvai [Sun, 16 Apr 2006 18:18:25 +0000 (18:18 +0000)]
Added a rebind js macro that rebinds variables on the js side
Marco Baringer [Sat, 1 Apr 2006 11:39:18 +0000 (11:39 +0000)]
Export defjsmacro
Marco Baringer [Sat, 1 Apr 2006 11:35:03 +0000 (11:35 +0000)]
Added docstring for *js-quote-char*
Xan Lopez [Sat, 1 Apr 2006 11:28:58 +0000 (11:28 +0000)]
Add variable *js-quote-char*
Signed-off-by: Marco Baringer <mb@bese.it>
Marco Baringer [Sun, 26 Feb 2006 17:05:27 +0000 (17:05 +0000)]
Implement js-to-strings for the regex class
Marco Baringer [Sat, 25 Feb 2006 17:07:51 +0000 (17:07 +0000)]
#\$ is not a special javascript character.
Reported by: Richard Morse <pukku@mac.com>
Luca Capello [Thu, 16 Feb 2006 08:42:59 +0000 (08:42 +0000)]
remove docs/images and relative references in tutorial.lisp
Luca Capello [Fri, 27 Jan 2006 13:25:11 +0000 (13:25 +0000)]
remove docs/reference.pdf, already included in manual.pdf
Marco Baringer [Sun, 5 Feb 2006 16:04:44 +0000 (16:04 +0000)]
The #\Form is not a standard character name, use #.(code-char 12) instead.
Henrik Hjelte [Thu, 2 Feb 2006 12:39:12 +0000 (12:39 +0000)]
proper escape sequences in strings
Henrik Hjelte [Wed, 1 Feb 2006 11:17:12 +0000 (11:17 +0000)]
ref2test finds reference.lisp in docs dir
Luca Capello [Fri, 27 Jan 2006 08:57:09 +0000 (08:57 +0000)]
merge parenscript-test.asd into parenscript.asd
Luca Capello [Mon, 23 Jan 2006 22:25:48 +0000 (22:25 +0000)]
move doc files to docs/
Luca Capello [Mon, 23 Jan 2006 21:50:26 +0000 (21:50 +0000)]
move test files to t/ and modify parenscript-test.asd as well
Luca Capello [Mon, 23 Jan 2006 21:31:52 +0000 (21:31 +0000)]
move source files to src/ and modify parenscript.asd as well
Luca Capello [Mon, 23 Jan 2006 21:19:27 +0000 (21:19 +0000)]
remove trailing spaces at endlines in *.lisp
Luca Capello [Sun, 22 Jan 2006 21:57:42 +0000 (21:57 +0000)]
remove trailing spaces at empty lines in *.lisp
Luca Capello [Sun, 22 Jan 2006 21:17:04 +0000 (21:17 +0000)]
pbook.py: convert endlines to Unix format
Henrik Hjelte [Mon, 9 Jan 2006 11:36:02 +0000 (11:36 +0000)]
css-inline compiles with cmucl
Marco Baringer [Mon, 19 Dec 2005 16:04:35 +0000 (16:04 +0000)]
New function gen-js-name-string
This allows you to get a unique javascript name as a string and not
just as a symbol.
Henrik Hjelte [Mon, 19 Dec 2005 13:19:01 +0000 (13:19 +0000)]
bugfix slot-value
Henrik Hjelte [Sun, 18 Dec 2005 17:17:24 +0000 (17:17 +0000)]
bug in dwim-join
Henrik Hjelte [Sun, 18 Dec 2005 11:14:26 +0000 (11:14 +0000)]
css-inline generator