--- /dev/null
+(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"))
;;; 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)))
(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"))))