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