In package definition, instead of exporting "NIL", exported (symbol-name 'nil).
[clinton/parenscript.git] / src / package.lisp
1 (in-package :cl-user)
2
3 (eval-when (:compile-toplevel :load-toplevel :execute)
4 (defparameter *parenscript-lang-exports*
5 '(
6 ;; literals
7 #:t
8 #:f
9 #:true
10 #.(symbol-name 'nil) ;; for case-sensitive Lisps like some versions of Allegro
11 #:this
12 #:false
13 #:undefined
14
15 ;; keywords
16 #:break
17 #:continue
18
19 ;; array literals
20 #:array
21 #:list
22 #:aref
23 #:make-array
24
25 ;; operators
26 #:! #:not #:~
27 #:* #:/ #:%
28 #:+ #:-
29 #:<< #:>>
30 #:>>>
31 #:< #:> #:<= #:>=
32 #:in
33 #:eql #:== #:!= #:=
34 #:=== #:!==
35 #:&
36 #:^
37 #:\|
38 #:\&\& #:and
39 #:\|\| #:or
40 #:>>= #:<<=
41 #:*= #:/= #:%= #:+= #:\&= #:^= #:\|= #:~=
42 #:1+ #:1-
43 #:incf #:decf
44
45 ;; body forms
46 #:progn
47
48 ;; object literals
49 #:create
50 #:with-slots
51
52 ;; macros
53 #:macrolet
54 #:symbol-macrolet
55
56 ;; if
57 #:if
58 #:when
59 #:unless
60
61 ;; single argument statements
62 #:return
63 #:throw
64
65 ;; single argument expressions
66 #:delete
67 #:void
68 #:typeof
69 #:instanceof
70 #:new
71
72 ;; assignment and binding
73 #:setf
74 #:defaultf
75 #:defsetf
76 #:let
77
78 ;; variables
79 #:defvar
80
81 ;; iteration
82 #:for
83 #:doeach
84 #:while
85
86 ;; with
87 #:with
88
89 ;; case
90 #:switch
91 #:case
92 #:default
93
94 ;; try throw catch
95 #:try
96
97 ;; regex literals
98 #:regex
99
100 ;; conditional compilation (IE)
101 #:cc-if
102
103 ;; function definition
104 #:defun
105 #:lambda
106
107 ;; lambda lists
108 #:&key
109 #:&rest
110 #:&body
111 #:&optional
112 #:&aux
113 #:&environment
114 #:&key-object
115
116 ;; slot access
117 #:with-slots
118 #:slot-value
119
120 ;; macros
121 #:macrolet
122 #:symbol-macrolet
123 #:define-symbol-macro
124 #:define-script-symbol-macro
125 #:defmacro
126
127 ;; lisp eval
128 #:lisp
129
130 ;; iteration
131 #:do
132 #:dotimes
133 #:dolist
134 #:doeach
135 #:while
136
137 ;; v v v STUFF WE SHOULD PROBABLY MOVE TO OTHER LIBS v v v
138
139 ;; CSS
140 #:css
141 #:css-to-string
142 #:css-inline
143 #:css-file
144
145 ;; html generator for javascript
146 #:ps-html
147
148 ;; utils
149 #:do-set-timeout
150 ))
151 "All symbols considerred part of the Parenscript language.")
152
153 (defpackage :parenscript
154 (:use :common-lisp)
155 (:nicknames :js :ps)
156 #.(cons :export *parenscript-lang-exports*)
157
158 ;;; symbols that form the interface to the Parenscript compiler
159 (:export
160 ;; compiler
161 #:compile-script
162 #:ps
163 #:ps*
164 #:ps-inline
165 #:ps-inline*
166
167 ;; for parenscript macro definition within lisp
168 #:defpsmacro
169 #:defmacro/ps
170 #:defmacro+ps
171 #:import-macros-from-lisp
172
173 ;; gensym
174 #:ps-gensym
175 #:with-ps-gensyms
176 #:*ps-gensym-counter*
177
178 ;; naming and namespaces
179 #:ps-package-prefix
180 #:obfuscate-package
181 #:unobfuscate-package
182
183 ;; deprecated interface
184 #:gen-js-name
185 #:gen-js-name-string
186 #:with-unique-js-names
187 #:defjsmacro
188 #:js-compile
189 #:js-inline
190 #:js-inline*
191 #:js-file
192 #:js-script
193 #:js-to-statement-strings
194 #:js
195 #:js*
196 ))