Got rid of parenscript-symbol object; special forms and macros are now
[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 '(;; literals
6 #:t
7 #:f
8 #:true
9 #.(symbol-name 'nil) ; for case-sensitive Lisps like some versions of Allegro
10 #:this
11 #:false
12 #:undefined
13 #:{}
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 #:incf #:decf
43
44 ;; body forms
45 #:progn
46
47 ;; object literals
48 #:create
49 #:with-slots
50
51 ;; macros
52 #:macrolet
53 #:symbol-macrolet
54
55 ;; if
56 #:if
57 #:when
58 #:unless
59
60 ;; single argument statements
61 #:return
62 #:throw
63
64 ;; single argument expressions
65 #:delete
66 #:void
67 #:typeof
68 #:instanceof
69 #:new
70
71 ;; assignment and binding
72 #:setf
73 #:defsetf
74 #:psetf
75 #:setq
76 #:psetq
77 #:simple-let*
78 #:simple-let
79 #:lexical-let*
80 #:lexical-let
81 #:let*
82 #:let
83
84 ;; variables
85 #:var
86 #:defvar
87
88 ;; iteration
89 #:labeled-for
90 #:for
91 #:for-in
92 #:while
93 #:do
94 #:do*
95 #:dotimes
96 #:dolist
97 #:doeach
98
99 ;; with
100 #:with
101
102 ;; case
103 #:switch
104 #:case
105 #:default
106
107 ;; try throw catch
108 #:try
109
110 ;; regex literals
111 #:regex
112
113 ;; conditional compilation (IE)
114 #:cc-if
115
116 ;; function definition
117 #:defun
118 #:lambda
119
120 ;; lambda lists
121 #:&key
122 #:&rest
123 #:&body
124 #:&optional
125 #:&aux
126 #:&environment
127 #:&key-object
128
129 ;; slot access
130 #:with-slots
131 #:slot-value
132
133 ;; macros
134 #:macrolet
135 #:symbol-macrolet
136 #:define-symbol-macro
137 #:define-ps-symbol-macro
138 #:defmacro
139
140 ;; lisp eval
141 #:lisp
142
143 ;; v v v STUFF WE SHOULD PROBABLY MOVE TO OTHER LIBS v v v
144
145 ;; html generator for javascript
146 #:ps-html
147 #:who-ps-html
148
149 ;; utils
150 #:do-set-timeout
151 #:max
152 #:min
153 #:floor
154 #:ceiling
155 #:round
156 #:sin
157 #:cos
158 #:tan
159 #:asin
160 #:acos
161 #:atan
162 #:pi
163 #:sinh
164 #:cosh
165 #:tanh
166 #:asinh
167 #:acosh
168 #:atanh
169 #:1+
170 #:1-
171 #:abs
172 #:evenp
173 #:oddp
174 #:exp
175 #:expt
176 #:log
177 #:sqrt
178 #:random
179 #:ignore-errors
180 #:concatenate
181 #:concat-string
182 #:length
183 #:null
184 #:@
185
186 ;; js runtime utils
187 #:*ps-lisp-library*
188 #:mapcar
189 #:map-into
190 #:map
191 #:map-until
192 #:member
193 #:append
194 #:set-difference
195 ))
196 (defparameter *parenscript-interface-exports*
197 '(;; compiler
198 #:compile-script
199 #:ps
200 #:ps-doc
201 #:ps*
202 #:ps-inline
203 #:ps-inline*
204
205 ;; for parenscript macro definition within lisp
206 #:defpsmacro
207 #:defmacro/ps
208 #:defmacro+ps
209 #:import-macros-from-lisp
210
211 ;; gensym
212 #:ps-gensym
213 #:with-ps-gensyms
214 #:ps-once-only
215 #:*ps-gensym-counter*
216
217 ;; naming and namespaces
218 #:ps-package-prefix
219 #:obfuscate-package
220 #:unobfuscate-package
221
222 ;; printer
223 #:symbol-to-js-string
224 #:*js-string-delimiter*
225 #:*js-inline-string-delimiter*
226 #:*ps-print-pretty*
227 #:*indent-num-spaces*
228 ))
229 (defparameter *parenscript-interface-deprecated-exports*
230 '(;; deprecated interface
231 #:define-script-symbol-macro
232 #:gen-js-name
233 #:with-unique-js-names
234 #:defjsmacro
235 #:js-compile
236 #:js-inline
237 #:js-inline*
238 #:js
239 #:js*
240 ))
241 )
242
243 (defpackage :parenscript
244 (:use :common-lisp)
245 (:nicknames :js :ps)
246 #.(cons :export *parenscript-lang-exports*)
247 #.(cons :export *parenscript-interface-exports*)
248 #.(cons :export *parenscript-interface-deprecated-exports*)
249 )
250