remove trailing spaces at endlines in *.lisp
authorLuca Capello <luca@pca.it>
Mon, 23 Jan 2006 21:19:27 +0000 (21:19 +0000)
committerLuca Capello <luca@pca.it>
Mon, 23 Jan 2006 21:19:27 +0000 (21:19 +0000)
css.lisp
introduction.lisp
js.lisp
js2.lisp
ref2test.lisp
reference-tests.lisp
reference.lisp
test.lisp
tutorial.lisp

index c775073..05c0a20 100644 (file)
--- a/css.lisp
+++ b/css.lisp
@@ -52,7 +52,7 @@
 
 ;;; generate a CSS file
 #+nil
-(html-stream *standard-output* 
+(html-stream *standard-output*
       (css-file (* :border "1px solid black")
            (div.bl0rg :font-family "serif")
            (("a:active" "a:hoover") :color "black" :size "200%")))
@@ -60,7 +60,7 @@
 
 ;;; generate an inline CSS spec in a HTML head element
 #+nil
-(html-stream *standard-output* 
+(html-stream *standard-output*
   (html
    (:html
     (:head
@@ -70,7 +70,7 @@
 
 ;;; generate a style attribute for a DIV element
 #+nil
-(html-stream *standard-output* 
+(html-stream *standard-output*
       (html (:html (:body ((:div :style (css-inline :border "1px solid black"))
                           "foobar")))))
 
index 88ae4ed..8202806 100644 (file)
@@ -78,7 +78,7 @@ for (var i = 0, j = arr[i]; i < 10; i = ++i, j = arr[i]) {
 
 ; compiles to
 "
-{ foo : 'foo', 
+{ foo : 'foo',
   bla : 'bla' }
 "
 ;;; ParenScript features a HTML generator. Using the same syntax as
@@ -110,7 +110,7 @@ function addDiv(name, href, linkText) {
 ;;; and complexities of Web syntax. For example, to generate a CSS
 ;;; inline node in a HTML document:
 
-(html-stream *standard-output* 
+(html-stream *standard-output*
   (html
    (:html
     (:head
diff --git a/js.lisp b/js.lisp
index 640b4b5..9263ffd 100644 (file)
--- a/js.lisp
+++ b/js.lisp
@@ -319,7 +319,7 @@ this macro."
 (defjsmacro list (&rest values)
   `(array ,@values))
 
-(defmethod js-to-strings ((array array-literal) start-pos) 
+(defmethod js-to-strings ((array array-literal) start-pos)
   (let ((value-string-lists
         (mapcar #'(lambda (x) (js-to-strings x (+ start-pos 2)))
                 (array-values array)))
index 60a1d38..6fbd9db 100644 (file)
--- a/js2.lisp
+++ b/js2.lisp
@@ -314,7 +314,7 @@ this macro."
 (defjsmacro list (&rest values)
   `(array ,@values))
 
-(defmethod js-to-strings ((array array-literal) start-pos) 
+(defmethod js-to-strings ((array array-literal) start-pos)
   (let ((value-string-lists
         (mapcar #'(lambda (x) (js-to-strings x (+ start-pos 2)))
                 (array-values array)))
index c701144..43a4e66 100644 (file)
@@ -1,4 +1,4 @@
-(in-package :js-test) 
+(in-package :js-test)
 ;;Generates automatic tests from the reference
 
 (defparameter +reference-file+ (make-pathname :name "reference"
@@ -23,7 +23,7 @@
     (with-open-file (out-stream +generate-file+
                                 :direction :output
                                 :if-exists :supersede)
-      (labels 
+      (labels
           ((empty-p (str)
              (zerop (length str)))
            (trim-whitespace (str)
index bd99496..971a506 100644 (file)
 (def-suite ref-tests)
 (in-suite ref-tests)
 
-(test-ps-js statements-and-expressions-1 
-  (+ i (if 1 2 3)) 
+(test-ps-js statements-and-expressions-1
+  (+ i (if 1 2 3))
   "i + (1 ? 2 : 3)")
 
-(test-ps-js statements-and-expressions-2 
-  (if 1 2 3) 
+(test-ps-js statements-and-expressions-2
+  (if 1 2 3)
   "if (1) {
   2;
 } else {
   3;
 }")
 
-(test-ps-js symbol-conversion-1 
-  !?#$@% 
+(test-ps-js symbol-conversion-1
+  !?#$@%
   "bangwhathashdollaratpercent")
 
-(test-ps-js symbol-conversion-2 
-  bla-foo-bar 
+(test-ps-js symbol-conversion-2
+  bla-foo-bar
   "blaFooBar")
 
-(test-ps-js symbol-conversion-3 
-  *array 
+(test-ps-js symbol-conversion-3
+  *array
   "Array")
 
-(test-ps-js symbol-conversion-6 
-  *global-array* 
+(test-ps-js symbol-conversion-6
+  *global-array*
   "GLOBALARRAY")
 
-(test-ps-js symbol-conversion-7 
-  *global-array*.length 
+(test-ps-js symbol-conversion-7
+  *global-array*.length
   "GLOBALARRAY.length")
 
-(test-ps-js number-literals-1 
-  1 
+(test-ps-js number-literals-1
+  1
   "1")
 
-(test-ps-js number-literals-2 
-  123.123 
+(test-ps-js number-literals-2
+  123.123
   "123.123")
 
-(test-ps-js number-literals-3 
-  #x10 
+(test-ps-js number-literals-3
+  #x10
   "16")
 
-(test-ps-js string-literals-1 
-  "foobar" 
+(test-ps-js string-literals-1
+  "foobar"
   "'foobar'")
 
-(test-ps-js string-literals-2 
-  "bratzel bub" 
+(test-ps-js string-literals-2
+  "bratzel bub"
   "'bratzel bub'")
 
-(test-ps-js array-literals-1 
-  (array) 
+(test-ps-js array-literals-1
+  (array)
   "[  ]")
 
-(test-ps-js array-literals-2 
-  (array 1 2 3) 
+(test-ps-js array-literals-2
+  (array 1 2 3)
   "[ 1, 2, 3 ]")
 
-(test-ps-js array-literals-3 
+(test-ps-js array-literals-3
   (array (array 2 3)
-       (array "foobar" "bratzel bub")) 
+       (array "foobar" "bratzel bub"))
   "[ [ 2, 3 ], [ 'foobar', 'bratzel bub' ] ]")
 
-(test-ps-js array-literals-4 
-  (make-array) 
+(test-ps-js array-literals-4
+  (make-array)
   "new Array()")
 
-(test-ps-js array-literals-5 
-  (make-array 1 2 3) 
+(test-ps-js array-literals-5
+  (make-array 1 2 3)
   "new Array(1, 2, 3)")
 
-(test-ps-js array-literals-6 
+(test-ps-js array-literals-6
   (make-array
  (make-array 2 3)
- (make-array "foobar" "bratzel bub")) 
+ (make-array "foobar" "bratzel bub"))
   "new Array(new Array(2, 3), new Array('foobar', 'bratzel bub'))")
 
-(test-ps-js object-literals-1 
-  (create :foo "bar" :blorg 1) 
-  "{ foo : 'bar', 
+(test-ps-js object-literals-1
+  (create :foo "bar" :blorg 1)
+  "{ foo : 'bar',
   blorg : 1 }")
 
-(test-ps-js object-literals-2 
+(test-ps-js object-literals-2
   (create :foo "hihi"
         :blorg (array 1 2 3)
-        :another-object (create :schtrunz 1)) 
-  "{ foo : 'hihi', 
-  blorg : [ 1, 2, 3 ], 
+        :another-object (create :schtrunz 1))
+  "{ foo : 'hihi',
+  blorg : [ 1, 2, 3 ],
   anotherObject : { schtrunz : 1 } }")
 
-(test-ps-js object-literals-3 
-  (slot-value an-object 'foo) 
+(test-ps-js object-literals-3
+  (slot-value an-object 'foo)
   "anObject.foo")
 
-(test-ps-js object-literals-4 
-  an-object.foo 
+(test-ps-js object-literals-4
+  an-object.foo
   "anObject.foo")
 
-(test-ps-js object-literals-5 
+(test-ps-js object-literals-5
   (with-slots (a b c) this
-  (+ a b c)) 
+  (+ a b c))
   "this.a + this.b + this.c;")
 
-(test-ps-js regular-expression-literals-1 
-  (regex "/foobar/i") 
+(test-ps-js regular-expression-literals-1
+  (regex "/foobar/i")
   "/foobar/i")
 
-(test-ps-js literal-symbols-1 
-  T 
+(test-ps-js literal-symbols-1
+  T
   "true")
 
-(test-ps-js literal-symbols-2 
-  FALSE 
+(test-ps-js literal-symbols-2
+  FALSE
   "false")
 
-(test-ps-js literal-symbols-3 
-  NIL 
+(test-ps-js literal-symbols-3
+  NIL
   "null")
 
-(test-ps-js literal-symbols-4 
-  UNDEFINED 
+(test-ps-js literal-symbols-4
+  UNDEFINED
   "undefined")
 
-(test-ps-js literal-symbols-5 
-  THIS 
+(test-ps-js literal-symbols-5
+  THIS
   "this")
 
-(test-ps-js variables-1 
-  variable 
+(test-ps-js variables-1
+  variable
   "variable")
 
-(test-ps-js variables-2 
-  a-variable 
+(test-ps-js variables-2
+  a-variable
   "aVariable")
 
-(test-ps-js variables-3 
-  *math 
+(test-ps-js variables-3
+  *math
   "Math")
 
-(test-ps-js variables-4 
-  *math.floor 
+(test-ps-js variables-4
+  *math.floor
   "Math.floor")
 
-(test-ps-js function-calls-and-method-calls-1 
-  (blorg 1 2) 
+(test-ps-js function-calls-and-method-calls-1
+  (blorg 1 2)
   "blorg(1, 2)")
 
-(test-ps-js function-calls-and-method-calls-2 
-  (foobar (blorg 1 2) (blabla 3 4) (array 2 3 4)) 
+(test-ps-js function-calls-and-method-calls-2
+  (foobar (blorg 1 2) (blabla 3 4) (array 2 3 4))
   "foobar(blorg(1, 2), blabla(3, 4), [ 2, 3, 4 ])")
 
-(test-ps-js function-calls-and-method-calls-3 
-  ((aref foo i) 1 2) 
+(test-ps-js function-calls-and-method-calls-3
+  ((aref foo i) 1 2)
   "foo[i](1, 2)")
 
-(test-ps-js function-calls-and-method-calls-4 
-  (.blorg this 1 2) 
+(test-ps-js function-calls-and-method-calls-4
+  (.blorg this 1 2)
   "this.blorg(1, 2)")
 
-(test-ps-js function-calls-and-method-calls-5 
-  (this.blorg 1 2) 
+(test-ps-js function-calls-and-method-calls-5
+  (this.blorg 1 2)
   "this.blorg(1, 2)")
 
-(test-ps-js function-calls-and-method-calls-6 
-  (.blorg (aref foobar 1) NIL T) 
+(test-ps-js function-calls-and-method-calls-6
+  (.blorg (aref foobar 1) NIL T)
   "foobar[1].blorg(null, true)")
 
-(test-ps-js operator-expressions-1 
-  (* 1 2) 
+(test-ps-js operator-expressions-1
+  (* 1 2)
   "1 * 2")
 
-(test-ps-js operator-expressions-2 
-  (= 1 2) 
+(test-ps-js operator-expressions-2
+  (= 1 2)
   "1 == 2")
 
-(test-ps-js operator-expressions-3 
-  (eql 1 2) 
+(test-ps-js operator-expressions-3
+  (eql 1 2)
   "1 == 2")
 
-(test-ps-js operator-expressions-5 
-  (* 1 (+ 2 3 4) 4 (/ 6 7)) 
+(test-ps-js operator-expressions-5
+  (* 1 (+ 2 3 4) 4 (/ 6 7))
   "1 * (2 + 3 + 4) * 4 * (6 / 7)")
 
-(test-ps-js operator-expressions-6 
-  (++ i) 
+(test-ps-js operator-expressions-6
+  (++ i)
   "i++")
 
-(test-ps-js operator-expressions-7 
-  (-- i) 
+(test-ps-js operator-expressions-7
+  (-- i)
   "i--")
 
-(test-ps-js operator-expressions-8 
-  (incf i) 
+(test-ps-js operator-expressions-8
+  (incf i)
   "++i")
 
-(test-ps-js operator-expressions-9 
-  (decf i) 
+(test-ps-js operator-expressions-9
+  (decf i)
   "--i")
 
-(test-ps-js operator-expressions-10 
-  (1- i) 
+(test-ps-js operator-expressions-10
+  (1- i)
   "i - 1")
 
-(test-ps-js operator-expressions-11 
-  (1+ i) 
+(test-ps-js operator-expressions-11
+  (1+ i)
   "i + 1")
 
-(test-ps-js operator-expressions-12 
-  (not (< i 2)) 
+(test-ps-js operator-expressions-12
+  (not (< i 2))
   "i >= 2")
 
-(test-ps-js operator-expressions-13 
-  (not (eql i 2)) 
+(test-ps-js operator-expressions-13
+  (not (eql i 2))
   "i != 2")
 
-(test-ps-js body-forms-1 
-  (progn (blorg i) (blafoo i)) 
+(test-ps-js body-forms-1
+  (progn (blorg i) (blafoo i))
   "blorg(i);
 blafoo(i);")
 
-(test-ps-js body-forms-2 
-  (+ i (progn (blorg i) (blafoo i))) 
+(test-ps-js body-forms-2
+  (+ i (progn (blorg i) (blafoo i)))
   "i + (blorg(i), blafoo(i))")
 
-(test-ps-js function-definition-1 
+(test-ps-js function-definition-1
   (defun a-function (a b)
-  (return (+ a b))) 
+  (return (+ a b)))
   "function aFunction(a, b) {
   return a + b;
 }")
 
-(test-ps-js function-definition-2 
-  (lambda (a b) (return (+ a b))) 
+(test-ps-js function-definition-2
+  (lambda (a b) (return (+ a b)))
   "function (a, b) {
   return a + b;
 }")
 
-(test-ps-js assignment-1 
-  (setf a 1) 
+(test-ps-js assignment-1
+  (setf a 1)
   "a = 1")
 
-(test-ps-js assignment-2 
-  (setf a 2 b 3 c 4 x (+ a b c)) 
+(test-ps-js assignment-2
+  (setf a 2 b 3 c 4 x (+ a b c))
   "a = 2;
 b = 3;
 c = 4;
 x = a + b + c;")
 
-(test-ps-js assignment-3 
-  (setf a (1+ a)) 
+(test-ps-js assignment-3
+  (setf a (1+ a))
   "a++")
 
-(test-ps-js assignment-4 
-  (setf a (* 2 3 4 a 4 a)) 
+(test-ps-js assignment-4
+  (setf a (* 2 3 4 a 4 a))
   "a *= 2 * 3 * 4 * 4 * a")
 
-(test-ps-js assignment-5 
-  (setf a (- 1 a)) 
+(test-ps-js assignment-5
+  (setf a (- 1 a))
   "a = 1 - a")
 
-(test-ps-js single-argument-statements-1 
-  (return 1) 
+(test-ps-js single-argument-statements-1
+  (return 1)
   "return 1")
 
-(test-ps-js single-argument-statements-2 
-  (throw "foobar") 
+(test-ps-js single-argument-statements-2
+  (throw "foobar")
   "throw 'foobar'")
 
-(test-ps-js single-argument-expression-1 
-  (delete (new (*foobar 2 3 4))) 
+(test-ps-js single-argument-expression-1
+  (delete (new (*foobar 2 3 4)))
   "delete new Foobar(2, 3, 4)")
 
-(test-ps-js single-argument-expression-2 
+(test-ps-js single-argument-expression-2
   (if (= (typeof blorg) *string)
     (alert (+ "blorg is a string: " blorg))
-    (alert "blorg is not a string")) 
+    (alert "blorg is not a string"))
   "if (typeof blorg == String) {
   alert('blorg is a string: ' + blorg);
 } else {
   alert('blorg is not a string');
 }")
 
-(test-ps-js conditional-statements-1 
+(test-ps-js conditional-statements-1
   (if (blorg.is-correct)
     (progn (carry-on) (return i))
-    (alert "blorg is not correct!")) 
+    (alert "blorg is not correct!"))
   "if (blorg.isCorrect()) {
   carryOn();
   return i;
@@ -301,36 +301,36 @@ x = a + b + c;")
   alert('blorg is not correct!');
 }")
 
-(test-ps-js conditional-statements-2 
-  (+ i (if (blorg.add-one) 1 2)) 
+(test-ps-js conditional-statements-2
+  (+ i (if (blorg.add-one) 1 2))
   "i + (blorg.addOne() ? 1 : 2)")
 
-(test-ps-js conditional-statements-3 
+(test-ps-js conditional-statements-3
   (when (blorg.is-correct)
   (carry-on)
-  (return i)) 
+  (return i))
   "if (blorg.isCorrect()) {
   carryOn();
   return i;
 }")
 
-(test-ps-js conditional-statements-4 
+(test-ps-js conditional-statements-4
   (unless (blorg.is-correct)
-  (alert "blorg is not correct!")) 
+  (alert "blorg is not correct!"))
   "if (!blorg.isCorrect()) {
   alert('blorg is not correct!');
 }")
 
-(test-ps-js variable-declaration-1 
-  (defvar *a* (array 1 2 3)) 
+(test-ps-js variable-declaration-1
+  (defvar *a* (array 1 2 3))
   "var A = [ 1, 2, 3 ];")
 
-(test-ps-js variable-declaration-2 
+(test-ps-js variable-declaration-2
   (if (= i 1)
     (progn (defvar blorg "hallo")
            (alert blorg))
     (progn (defvar blorg "blitzel")
-           (alert blorg))) 
+           (alert blorg)))
   "if (i == 1) {
   var blorg = 'hallo';
   alert(blorg);
@@ -339,12 +339,12 @@ x = a + b + c;")
   alert(blorg);
 }")
 
-(test-ps-js variable-declaration-3 
+(test-ps-js variable-declaration-3
   (if (= i 1)
     (let ((blorg "hallo"))
       (alert blorg))
     (let ((blorg "blitzel"))
-      (alert blorg))) 
+      (alert blorg)))
   "if (i == 1) {
   var blorg = 'hallo';
   alert(blorg);
@@ -353,28 +353,28 @@ x = a + b + c;")
   alert(blorg);
 }")
 
-(test-ps-js iteration-constructs-1 
+(test-ps-js iteration-constructs-1
   (do ((i 0 (1+ i))
      (l (aref blorg i) (aref blorg i)))
     ((or (= i blorg.length)
          (eql l "Fumitastic")))
-  (document.write (+ "L is " l))) 
-  "for (var i = 0, l = blorg[i]; 
+  (document.write (+ "L is " l)))
+  "for (var i = 0, l = blorg[i];
      !(i == blorg.length || l == 'Fumitastic');
      i = i + 1, l = blorg[i]) {
   document.write('L is ' + l);
 }")
 
-(test-ps-js iteration-constructs-2 
+(test-ps-js iteration-constructs-2
   (dotimes (i blorg.length)
-  (document.write (+ "L is " (aref blorg i)))) 
+  (document.write (+ "L is " (aref blorg i))))
   "for (var i = 0; i < blorg.length; i = i + 1) {
   document.write('L is ' + blorg[i]);
 }")
 
-(test-ps-js iteration-constructs-3 
+(test-ps-js iteration-constructs-3
   (dolist (l blorg)
-  (document.write (+ "L is " l))) 
+  (document.write (+ "L is " l)))
   "{
   var tmpArr1 = blorg;
   for (var tmpI2 = 0; tmpI2 < tmpArr1.length;
@@ -384,45 +384,45 @@ x = a + b + c;")
   }
 }")
 
-(test-ps-js iteration-constructs-4 
+(test-ps-js iteration-constructs-4
   (doeach (i object)
-   (document.write (+ i " is " (aref object i)))) 
+   (document.write (+ i " is " (aref object i))))
   "for (var i in object) {
   document.write(i + ' is ' + object[i]);
 }")
 
-(test-ps-js iteration-constructs-5 
+(test-ps-js iteration-constructs-5
   (while (film.is-not-finished)
-  (this.eat (new *popcorn))) 
+  (this.eat (new *popcorn)))
   "while (film.isNotFinished()) {
   this.eat(new Popcorn);
 }")
 
-(test-ps-js the-case-statement-1 
+(test-ps-js the-case-statement-1
   (case (aref blorg i)
   (1 (alert "one"))
   (2 (alert "two"))
-  (default (alert "default clause"))) 
+  (default (alert "default clause")))
   "switch (blorg[i]) {
   case 1:   alert('one');
   case 2:   alert('two');
   default:   alert('default clause');
 }")
 
-(test-ps-js the-with-statement-1 
+(test-ps-js the-with-statement-1
   (with ((create :foo "foo" :i "i"))
-  (alert (+ "i is now intermediary scoped: " i))) 
-  "with ({ foo : 'foo', 
+  (alert (+ "i is now intermediary scoped: " i)))
+  "with ({ foo : 'foo',
         i : 'i' }) {
   alert('i is now intermediary scoped: ' + i);
 }")
 
-(test-ps-js the-try-statement-1 
-  (try (throw "i") 
+(test-ps-js the-try-statement-1
+  (try (throw "i")
  (:catch (error)
    (alert (+ "an error happened: " error)))
  (:finally
-   (alert "Leaving the try form"))) 
+   (alert "Leaving the try form")))
   "try {
   throw 'i';
 } catch (error) {
@@ -431,30 +431,30 @@ x = a + b + c;")
   alert('Leaving the try form');
 }")
 
-(test-ps-js the-html-generator-1 
-  (html ((:a :href "foobar") "blorg")) 
+(test-ps-js the-html-generator-1
+  (html ((:a :href "foobar") "blorg"))
   "'<a href=\"foobar\">blorg</a>'")
 
-(test-ps-js the-html-generator-2 
-  (html ((:a :href (generate-a-link)) "blorg")) 
+(test-ps-js the-html-generator-2
+  (html ((:a :href (generate-a-link)) "blorg"))
   "'<a href=\"' + generateALink() + '\">blorg</a>'")
 
-(test-ps-js the-html-generator-3 
+(test-ps-js the-html-generator-3
   (document.write
   (html ((:a :href "#"
-            :onclick (js-inline (transport))) "link"))) 
+            :onclick (js-inline (transport))) "link")))
   "document.write
 ('<a href=\"#\" onclick=\"' + 'javascript:transport();' + '\">link</a>')")
 
-(test-ps-js the-html-generator-4 
+(test-ps-js the-html-generator-4
   (css-inline :color "red"
-            :font-size "x-small") 
+            :font-size "x-small")
   "'color:red;font-size:x-small'")
 
-(test-ps-js the-html-generator-5 
+(test-ps-js the-html-generator-5
   (defun make-color-div(color-name)
     (return (html ((:div :style (css-inline :color color-name))
-                   color-name " looks like this.")))) 
+                   color-name " looks like this."))))
   "function makeColorDiv(colorName) {
   return '<div style=\"' + ('color:' + colorName) + '\">' + colorName
     + ' looks like this.</div>';
index 9e55820..f0f9e40 100644 (file)
@@ -38,7 +38,7 @@
 ;;; few simple rules. Special characters `!', `?', `#', `$', `@', `%',
 ;;; '/', `*' and `+' get replaced by their written-out equivalents
 ;;; "bang", "what", "hash", "dollar", "at", "percent", "slash",
-;;; "start" and "plus" respectively. 
+;;; "start" and "plus" respectively.
 
 !?#$@% => bangwhathashdollaratpercent
 
@@ -102,7 +102,7 @@ WHEN WHILE WITH WITH-SLOTS
 
 ;;;
 ;;; ParenScript supports the standard JavaScript literal
-;;; values. Numbers are compiled into JavaScript numbers. 
+;;; values. Numbers are compiled into JavaScript numbers.
 
 1       => 1
 
@@ -197,14 +197,14 @@ WHEN WHILE WITH WITH-SLOTS
 ;;; more "lispy", the property names can be keywords.
 
 (create :foo "bar" :blorg 1)
-   => { foo : 'bar', 
+   => { foo : 'bar',
         blorg : 1 }
 
 (create :foo "hihi"
         :blorg (array 1 2 3)
         :another-object (create :schtrunz 1))
-   => { foo : 'hihi', 
-        blorg : [ 1, 2, 3 ], 
+   => { foo : 'hihi',
+        blorg : [ 1, 2, 3 ],
         anotherObject : { schtrunz : 1 } }
 
 ;;; Object properties can be accessed using the `SLOT-VALUE' form,
@@ -256,7 +256,7 @@ an-object.foo => anObject.foo
 ; T, FALSE, NIL, UNDEFINED, THIS
 
 ;;; The Lisp symbols `T' and `FALSE' are converted to their JavaScript
-;;; boolean equivalents `true' and `false'.  
+;;; boolean equivalents `true' and `false'.
 
 T     => true
 
@@ -356,7 +356,7 @@ a-variable  => aVariable
 ; argument ::= a ParenScript expression
 
 ;;; Operator forms are similar to function call forms, but have an
-;;; operator as function name. 
+;;; operator as function name.
 ;;;
 ;;; Please note that `=' is converted to `==' in JavaScript. The `='
 ;;; ParenScript operator is not the assignment operator. Unlike
@@ -706,7 +706,7 @@ a-variable  => aVariable
     ((or (= i blorg.length)
          (eql l "Fumitastic")))
   (document.write (+ "L is " l)))
-   => for (var i = 0, l = blorg[i]; 
+   => for (var i = 0, l = blorg[i];
            !(i == blorg.length || l == 'Fumitastic');
            i = i + 1, l = blorg[i]) {
         document.write('L is ' + l);
@@ -800,7 +800,7 @@ a-variable  => aVariable
 
 (with ((create :foo "foo" :i "i"))
   (alert (+ "i is now intermediary scoped: " i)))
-   => with ({ foo : 'foo', 
+   => with ({ foo : 'foo',
               i : 'i' }) {
         alert('i is now intermediary scoped: ' + i);
       }
@@ -823,7 +823,7 @@ a-variable  => aVariable
 ;;; is catched, and the body of the finally is always invoked when
 ;;; leaving the body of the `TRY' form.
 
-(try (throw "i") 
+(try (throw "i")
  (:catch (error)
    (alert (+ "an error happened: " error)))
  (:finally
@@ -983,7 +983,7 @@ a-variable  => aVariable
 ;;; The ParenScript compiler can be invoked from withing Lisp and from
 ;;; within ParenScript itself. The primary API function is
 ;;; `JS-COMPILE', which takes a list of ParenScript, and returns an
-;;; internal object representing the compiled ParenScript. 
+;;; internal object representing the compiled ParenScript.
 
 (js-compile '(foobar 1 2))
   => #<JS::FUNCTION-CALL {584AA5DD}>
index b60f1c6..651c6cb 100644 (file)
--- a/test.lisp
+++ b/test.lisp
@@ -25,7 +25,7 @@
     (let ((generated-code (js-to-string ',parenscript))
           (js-code ,javascript))
       (is (string= (normalize-js-code generated-code)
-                   (normalize-js-code js-code)))))) 
+                   (normalize-js-code js-code))))))
 
 (defun run-tests()
   (format t "Running reference tests:~&")
@@ -52,7 +52,7 @@
  + '\"></div>')") ;";This line should start with a plus character.
 
 
-(test-ps-js simple-slot-value 
+(test-ps-js simple-slot-value
   (let ((foo (create :a 1)))
    (alert (slot-value foo 'a)))
   "{
@@ -60,7 +60,7 @@
     alert(foo.a);
    }")
 
-(test-ps-js buggy-slot-value 
+(test-ps-js buggy-slot-value
    (let ((foo (create :a 1))
         (slot-name "a"))
     (alert (slot-value foo slot-name)))
index 25bda8a..a16098e 100644 (file)
@@ -59,7 +59,7 @@
 ;;; Browsing "http://localhost:8000/tutorial1" should return an empty
 ;;; HTML page. It's now time to fill this rather page with
 ;;; content. ParenScript features a macro that generates a string that
-;;; can be used as an attribute value of HTML nodes. 
+;;; can be used as an attribute value of HTML nodes.
 
 (defun tutorial1 (req ent)
   (declare (ignore req ent))
@@ -569,7 +569,7 @@ function transport() {
 ;;; We can now publish the same slideshow as before, under the
 ;;; "/bknr/" prefix:
 
-(publish-slideshow "/bknr/" 
+(publish-slideshow "/bknr/"
   `("/home/manuel/bknr-sputnik.png"
     "/home/manuel/bknrlogo_red648.png"
     "/home/manuel/screenshots/screenshot-14.03.2005-11.54.33.png"))