Added defgenerics for all the defmethods
authorAlan-Shields <Alan-Shields@omrf.ouhsc.edu>
Thu, 1 Dec 2005 19:17:09 +0000 (19:17 +0000)
committerAlan-Shields <Alan-Shields@omrf.ouhsc.edu>
Thu, 1 Dec 2005 19:17:09 +0000 (19:17 +0000)
Ze style warnings! Zey drive me craaaazy.

defgenerics.lisp [new file with mode: 0644]
js.lisp
parenscript.asd

diff --git a/defgenerics.lisp b/defgenerics.lisp
new file mode 100644 (file)
index 0000000..40a17ed
--- /dev/null
@@ -0,0 +1,17 @@
+(in-package :js)
+
+(defgeneric js-equal (obj1 obj2)
+  (:documentation "Determine if two enscript-javascript statements are equivalent"))
+
+(defgeneric js-to-strings (expression start-pos)
+  (:documentation "Transform an enscript-javascript expression to a string"))
+
+(defgeneric js-to-statement-strings (code-fragment start-pos)
+  (:documentation "Transform an enscript-javascript code fragment to a string"))
+
+(defgeneric expression-precedence (expression)
+  (:documentation "Returns the precedence of an enscript-javascript expression"))
+
+(defgeneric function-start-string (function)
+  (:documentation "Returns the string that starts the function - this varies according to whether
+this is a lambda or a defun"))
diff --git a/js.lisp b/js.lisp
index 2fb039c..bd3df21 100644 (file)
--- a/js.lisp
+++ b/js.lisp
@@ -75,7 +75,6 @@
 
 ;;; js language types
 
-(defgeneric js-equal (obj1 obj2))
 (defmethod js-equal ((obj1 list) (obj2 list))
   (and (= (length obj1) (length obj2))
        (every #'js-equal obj1 obj2)))
index efcfccd..b18ded5 100644 (file)
@@ -19,6 +19,7 @@
                      (pushnew :parenscript cl:*features*))
     :components ((:file "package")
                 (:file "utils" :depends-on ("package"))
-                (:file "js" :depends-on ("package" "utils"))
+                (:file "defgenerics" :depends-on ("package"))
+                (:file "js" :depends-on ("package" "utils" "defgenerics"))
                 (:file "js-html" :depends-on ("package" "js" "utils"))
                 (:file "css" :depends-on ("package" "utils"))))