2 ;;;; Package definitions for the Parenscript
5 (eval-when (:compile-toplevel
:load-toplevel
)
6 ;; exports shared between PARENSCRIPT and PARENSCRIPT.JAVASCRIPT
7 (defparameter *shared-symbols-ps-js
*
44 #:*= #:/= #:%
= #:+= #:\
&= #:^
= #:\|
= #:~
=
65 ;; single argument statements
69 ;; single argument expressions
101 ;; conditional compilation (IE)
103 "Symbols exported from both the Parenscript and Javascript packages
104 that are also valid as Parenscript symbols for the corresponding script packages."))
106 (defpackage parenscript.javascript
108 (:nicknames javascript ps-js
)
109 #.
(cons :export
*shared-symbols-ps-js
*)
111 ;; function definition
117 #:js-to-statement-strings
119 (:documentation
"The package used to define Javascript special forms. Most of Parenscript
120 is defined as macros on top of Javascript special forms"))
122 (eval-when (:compile-toplevel
:load-toplevel
:execute
)
123 (defparameter *parenscript-lang-exports
*
125 *shared-symbols-ps-js
*
131 ;; function definition
154 #:define-symbol-macro
155 #:define-script-symbol-macro
174 ;; v v v STUFF WE SHOULD PROBABLY MOVE TO OTHER LIBS v v v
182 ;; html generator for javascript
188 "List of (uninterned) symbols. Contains all symbols considerred
189 part of the Parenscript language. These should be exported within
190 both the Lisp package and the script package for Parenscript."))
192 (defpackage :parenscript
193 (:use
:common-lisp
:parenscript.javascript
)
195 #.
(cons :export
*shared-symbols-ps-js
*)
196 #.
(cons :export
*parenscript-lang-exports
*)
206 #:with-new-compilation-environment
; tentative
207 #:with-compilation-environment
; tentative
208 #:*compilation-environment
*
211 #:find-script-package
215 #:comp-env-current-package
216 #:symbol-script-package
217 #:script-package-name
219 ;; for parenscript macro definition within lisp
221 #:defpsmacro
; should we use one or the other of these?
224 #:import-macros-from-lisp
227 #:with-unique-ps-names
229 #:gen-script-name-string
232 ;; deprecated interface
235 #:with-unique-js-names
242 #:js-to-statement-strings
245 (in-package :parenscript
)
248 define-script-special-form
252 *package-prefix-style
*
257 compile-to-expression
258 symbol-script-package
267 script-special-form-p
268 make-macro-env-dictionary
272 :parenscript.javascript
)
274 (defpackage parenscript.global
275 (:nicknames
"GLOBAL")
276 (:documentation
"Symbols interned in the global package are serialized in Javascript
277 as non-prefixed identifiers."))
279 (defpackage parenscript.user
281 (:nicknames ps-user parenscript-user
)
282 (:documentation
"The default package a user is inside of when compiling code."))
284 (defpackage parenscript.non-prefixed
(:nicknames ps.non-prefixed
))
285 (defpackage parenscript.ps-gensyms
)