-(in-package :cl-user)
+(in-package "CL-USER")
(eval-when (:compile-toplevel :load-toplevel :execute)
(defparameter *parenscript-lang-exports*
#:this
#:false
#:undefined
+ #:{}
;; keywords
#:break
#:array
#:list
#:aref
+ #:elt
#:make-array
+ #:[]
;; operators
#:! #:not #:~
#:create
#:with-slots
- ;; macros
- #:macrolet
- #:symbol-macrolet
-
;; if
#:if
#:when
#:do*
#:dotimes
#:dolist
- #:doeach
+ #:loop
;; with
#:with
;; function definition
#:defun
#:lambda
+ #:flet
+ #:labels
;; lambda lists
#:&key
;; v v v STUFF WE SHOULD PROBABLY MOVE TO OTHER LIBS v v v
;; html generator for javascript
+ #:*ps-html-empty-tag-aware-p*
+ #:*ps-html-mode*
#:ps-html
+ #:who-ps-html
;; utils
#:do-set-timeout
#:random
#:ignore-errors
#:concatenate
+ #:concat-string
#:length
#:null
+ #:defined
+ #:undefined
#:@
+ #:with-lambda
+ #:stringp
+ #:numberp
+ #:functionp
+ #:objectp
+ #:memoize
+ #:append
+ #:apply
+ #:destructuring-bind
;; js runtime utils
#:*ps-lisp-library*
#:compile-script
#:ps
#:ps-doc
+ #:ps-doc*
#:ps*
+ #:ps1*
#:ps-inline
#:ps-inline*
#:unobfuscate-package
;; printer
+ #:symbol-to-js-string
#:*js-string-delimiter*
#:*js-inline-string-delimiter*
#:*ps-print-pretty*
#:js-inline*
#:js
#:js*
+ #:symbol-to-js
+ ))
+
+ (defparameter *javascript-exports*
+ '(;; for representing js code as s-expressions
+ #:?
+ #:if
+ #:unary-operator
+ #:--
+ #:!
+ #:block
+ #:literal
+ #:break
+ #:continue
+ #:return
+ #:throw
+ #:array
+ #:aref
+ #:++
+ #:+=
+ #:operator
+ #:-=
+ #:-
+ #:=
+ #:cond
+ #:lambda
+ #:object
+ #:variable
+ #:slot-value
+ #:new
+ #:funcall
+ #:instanceof
+ #:in
+ #:escape
))
)
-(defpackage :parenscript
- (:use :common-lisp)
- (:nicknames :js :ps)
+(defpackage "PARENSCRIPT"
+ (:use "COMMON-LISP")
+ (:nicknames "JS" "PS")
#.(cons :export *parenscript-lang-exports*)
#.(cons :export *parenscript-interface-exports*)
#.(cons :export *parenscript-interface-deprecated-exports*)
+ #.(cons :export *javascript-exports*)
)