Some minor comment and whitespace cleanup.
authorTravis Cross <tc@traviscross.com>
Sun, 30 Mar 2008 20:11:34 +0000 (20:11 +0000)
committerTravis Cross <tc@traviscross.com>
Sun, 30 Mar 2008 20:11:34 +0000 (20:11 +0000)
docs/introduction.lisp
src/compiler.lisp
src/deprecated-interface.lisp
src/lib/ps-html.lisp
src/package.lisp
src/parse-lambda-list.lisp
src/printer.lisp
src/special-forms.lisp
src/utils.lisp

index 76c5efb..e9e5e32 100644 (file)
@@ -52,7 +52,7 @@ function foobar(a, b) {
       ((>= i 10))
     (alert (+ "i is " i " and j is " j))))
 
-; compiles to
+;; compiles to
 "
 for (var i = 0, j = arr[i]; i < 10; i = ++i, j = arr[i]) {
   alert('i is ' + i + ' and j is ' + j);
@@ -74,7 +74,7 @@ for (var i = 0, j = arr[i]; i < 10; i = ++i, j = arr[i]) {
   (create :foo "foo"
           :bla "bla"))
 
-; compiles to
+;; compiles to
 "
 { foo : 'foo',
   bla : 'bla' }
@@ -92,7 +92,7 @@ for (var i = 0, j = arr[i]; i < 10; i = ++i, j = arr[i]) {
                "The link is: "
                ((:a :href href) link-text))))))
 
-; compiles to
+;; compiles to
 "
 function addDiv(name, href, linkText) {
   document.write('<div id=\"' + name + '\">The link is: <a href=\"'
@@ -117,7 +117,7 @@ function addDiv(name, href, linkText) {
           (div.bl0rg :font-family "serif")
           (("a:active" "a:hoover") :color "black" :size "200%"))))))
 
-; which produces
+;; which produces
 
 <html><head><style type="text/css">
 <!--
index bdbe625..2a3732f 100644 (file)
@@ -177,7 +177,7 @@ whether any expansion was performed on the form or not."
   (if (consp form)
       (let ((op (car form))
             (args (cdr form)))
-        (cond ((equal op 'quote) (values (if (equalp '(nil) args) nil form) ;; leave quotes alone, unless it's a quoted nil
+        (cond ((equal op 'quote) (values (if (equalp '(nil) args) nil form) ; leave quotes alone, unless it's a quoted nil
                                          nil))
               ((script-macro-p op) (values (ps-macroexpand (funcall (lookup-macro-expansion-function op) form)) t))
               (t (values form nil))))
index 68f6550..85470e9 100644 (file)
 
 (defmacro defun-js (old-name new-name args &body body)
   `(defun ,old-name ,args
-    ,(when (and (stringp (car body)) (< 1 (length body))) ;; docstring
+    ,(when (and (stringp (car body)) (< 1 (length body))) ; docstring
            (car body))
     (warn-deprecated ',old-name ',new-name)
     ,@body))
 
-;;; DEPRECATED INTERFACE ;;;
+;;; DEPRECATED INTERFACE
 
 (defun js-equal (ps-form1 ps-form2)
   (warn-deprecated 'js-equal)
index a2197f6..f24682a 100644 (file)
@@ -1,6 +1,6 @@
 (in-package :parenscript)
 
-(defun process-html-forms (forms) ;; this needs a rewrite
+(defun process-html-forms (forms) ; this needs a rewrite
   (let ((res ()))
     (labels ((handle-form (form)
                (cond ((keywordp form)
index 80e607e..a6aa327 100644 (file)
@@ -7,7 +7,7 @@
       #:t
       #:f
       #:true
-      #.(symbol-name 'nil) ;; for case-sensitive Lisps like some versions of Allegro
+      #.(symbol-name 'nil) ; for case-sensitive Lisps like some versions of Allegro
       #:this
       #:false
       #:undefined
index 33f8be0..6d7a40e 100644 (file)
@@ -45,8 +45,8 @@
   (let ((macros ())
         (binds ()))
     (dolist (spec collections)
-                                        ;      (unless (proper-list-of-length-p spec 1 3)
-                                        ;        (error "malformed collection specifier: ~S" spec))
+      ;;(unless (proper-list-of-length-p spec 1 3)
+      ;;  (error "malformed collection specifier: ~S" spec))
       (let* ((name (first spec))
              (default (second spec))
              (kind (or (third spec) 'collect))
 ;;; even if they could conceivably be legal in not-quite-a-lambda-list
 ;;; weirdosities
 (defun parse-lambda-list (lambda-list)
-
   ;; Classify parameters without checking their validity individually.
   (multiple-value-bind (required optional restp rest keyp keys allowp auxp aux
                         morep more-context more-count beyond-requireds? key-object)
       (parse-lambda-list-like-thing lambda-list)
     (declare (ignore beyond-requireds?))
-
     ;; Check validity of parameters.
     (flet ((need-symbol (x why)
              (unless (symbolp x)
             (t
              (format t "&KEY parameter is not a symbol or cons: ~S"
                              i))))))
-
     ;; Voila.
     (values required optional restp rest keyp keys allowp auxp aux
             morep more-context more-count key-object)))
index ef01cf7..7c2b4a3 100644 (file)
@@ -6,7 +6,7 @@
 (defmethod parenscript-print (ps-form &optional *ps-output-stream*)
   (setf *indent-level* 0)
   (flet ((print-ps (form)
-           (if (and (listp form) (eql 'js-block (car form))) ;; ignore top-level block
+           (if (and (listp form) (eql 'js-block (car form))) ; ignore top-level block
                (loop for (statement . remaining) on (third form) do
                      (ps-print statement) (psw ";") (when remaining (psw #\Newline)))
                (ps-print form))))
@@ -15,7 +15,7 @@
         (with-output-to-string (*ps-output-stream*)
           (print-ps ps-form)))))
 
-(defun psw (obj) ;; parenscript-write
+(defun psw (obj) ; parenscript-write
   (princ obj *ps-output-stream*))    
 
 (defgeneric ps-print% (special-form-name special-form-args))
@@ -33,7 +33,7 @@ arguments, defines a printer for that form using the given body."
 
 (defgeneric ps-print (compiled-form))
 
-(defmethod ps-print ((form null)) ;; don't print top-level nils (ex: result of defining macros, etc.)
+(defmethod ps-print ((form null)) ; don't print top-level nils (ex: result of defining macros, etc.)
   )
 
 (defmethod ps-print ((compiled-form cons))
index c56ecd1..7007f78 100644 (file)
@@ -314,8 +314,7 @@ the given lambda-list and body."
                             (declare (ignore x y))
                             (when specified? (cons var val))))
                       keys))))
-           (body-paren-forms (parse-function-body body)) ;remove documentation
-           ;;
+           (body-paren-forms (parse-function-body body)) ; remove documentation
            (initform-forms
             (mapcar #'(lambda (default-pair)
                         `(defaultf ,(car default-pair) ,(cdr default-pair)))
index ca33069..f253f0e 100644 (file)
@@ -103,6 +103,6 @@ SOMEGLOBAL."
              (coerce (nreverse res) 'string)))
           (t (string-join (mapcar #'symbol-to-js symbols) "")))))
 
-(defun ordered-set-difference (list1 list2 &key (test #'eql)) ;; because the CL set-difference may not preserve order
+(defun ordered-set-difference (list1 list2 &key (test #'eql)) ; because the CL set-difference may not preserve order
   (reduce (lambda (list el) (remove el list :test test))
-          (cons list1 list2)))
\ No newline at end of file
+          (cons list1 list2)))