Implemented implicit blocks for defun/flet/labels and for loops.
[parenscript.git] / src / package.lisp
blobe243f8cee4c587c73d1b9c430b128e08c4c4fcbd
1 (in-package #:cl)
3 (pushnew :parenscript *features*)
5 (defpackage #:parenscript
6 (:use #:cl #:anaphora)
7 (:nicknames #:ps)
8 (:export
9 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
10 ;;; Compiler interface
12 ;; compiler
13 #:*js-target-version*
14 #:ps
15 #:*parenscript-stream*
16 #:ps-to-stream
17 #:ps-doc
18 #:ps-doc*
19 #:ps*
20 #:ps-inline
21 #:ps-inline*
22 #:*ps-read-function*
23 #:ps-compile-file
24 #:ps-compile-stream
25 ;; for parenscript macro definition within lisp
26 #:defpsmacro
27 #:defmacro+ps
28 #:import-macros-from-lisp
30 ;; gensym
31 #:ps-gensym
32 #:with-ps-gensyms
33 #:ps-once-only
34 #:*ps-gensym-counter*
36 ;; naming and namespaces
37 #:in-package
38 #:use-package
39 #:ps-package-prefix
40 #:obfuscate-package
41 #:unobfuscate-package
43 ;; printer
44 #:symbol-to-js-string
45 #:*js-string-delimiter*
46 #:*js-inline-string-delimiter*
47 #:*ps-print-pretty*
48 #:*indent-num-spaces*
50 ;; deprecated interface
51 #:define-script-symbol-macro
52 #:gen-js-name
53 #:with-unique-js-names
54 #:defjsmacro
55 #:js-compile
56 #:js-inline
57 #:js-inline*
58 #:js
59 #:js*
60 #:symbol-to-js
61 #:slot-value
62 #:compile-script
63 #:defmacro/ps
64 #:%
65 #:==
66 #:===
67 #:!=
68 #:!==
69 #:labeled-for
70 #:do-set-timeout
71 #:concat-string
72 #:with
73 #:label
75 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
76 ;;; Language
78 ;; literals
79 #:t
80 #:f
81 #.(symbol-name 'nil) ; for case-sensitive Lisps like some versions of Allegro
82 #:this
83 #:undefined
84 #:{}
86 ;; keywords
87 #:break
88 #:continue
90 ;; array literals
91 #:array
92 #:list
93 #:aref
94 #:elt
95 #:make-array
96 #:[]
98 ;; operators
99 ;; logical boolean
100 #:not
101 #:and
102 #:or
104 ;; bitwise boolean
105 #:logand
106 #:logior
107 #:logxor
108 #:lognot
112 #:rem
117 #:<=
118 #:>=
119 #:incf
120 #:decf
121 #:equal
122 #:eql
123 #:eq
126 ;; compile-time stuff
127 #:eval-when
129 ;; body forms
130 #:progn
132 ;; object literals
133 #:create
134 #:with-slots
136 ;; if
137 #:if
138 #:when
139 #:unless
141 ;; single argument statements
142 #:return
143 #:throw
145 ;; single argument expressions
146 #:delete
147 #:typeof
148 #:instanceof
149 #:new
151 ;; assignment and binding
152 #:setf
153 #:defsetf
154 #:psetf
155 #:setq
156 #:psetq
157 #:let*
158 #:let
160 ;; variables
161 #:var
162 #:defvar
164 ;; iteration
165 #:for
166 #:for-in
167 #:while
168 #:do
169 #:do*
170 #:dotimes
171 #:dolist
172 #:loop
174 ;; case
175 #:switch
176 #:case
177 #:default
179 ;; try throw catch
180 #:try
182 ;; regex literals
183 #:regex
185 ;; function definition
186 #:defun
187 #:lambda
188 #:flet
189 #:labels
191 ;; lambda lists
192 #:&key
193 #:&rest
194 #:&body
195 #:&optional
196 #:&aux
197 #:&environment
198 #:&key-object
200 ;; slot access
201 #:with-slots
202 #:getprop
203 #:in
205 ;; macros
206 #:macrolet
207 #:symbol-macrolet
208 #:define-symbol-macro
209 #:define-ps-symbol-macro
210 #:defmacro
212 ;; lisp eval
213 #:lisp
215 ;; v v v STUFF WE SHOULD PROBABLY MOVE TO OTHER LIBS v v v
217 ;; html generator for javascript
218 #:*ps-html-empty-tag-aware-p*
219 #:*ps-html-mode*
220 #:ps-html
221 #:who-ps-html
223 ;; utils
224 #:max
225 #:min
226 #:floor
227 #:ceiling
228 #:round
229 #:sin
230 #:cos
231 #:tan
232 #:asin
233 #:acos
234 #:atan
235 #:pi
236 #:sinh
237 #:cosh
238 #:tanh
239 #:asinh
240 #:acosh
241 #:atanh
242 #:1+
243 #:1-
244 #:abs
245 #:evenp
246 #:oddp
247 #:exp
248 #:expt
249 #:log
250 #:sqrt
251 #:random
252 #:ignore-errors
253 #:concatenate
254 #:stringify
255 #:length
256 #:defined
257 #:undefined
259 #:chain
260 #:stringp
261 #:numberp
262 #:functionp
263 #:objectp
264 #:append
265 #:apply
266 #:destructuring-bind
268 ;; DOM accessing utils
269 #:inner-html
270 #:uri-encode
271 #:attribute
272 #:offset
273 #:scroll
274 #:inner
275 #:client
277 ;; js runtime utils
278 #:*ps-lisp-library*
279 #:mapcar
280 #:map-into
281 #:map
282 #:member
283 #:append
284 #:set-difference
288 (defpackage #:js
289 (:shadowing-import-from #:cl
293 #:/)
294 (:export
295 ;; operators
296 ;; arithmetic
299 #:negate
304 ;; bitwise
306 #:\|
309 #:>>
310 #:<<
311 #:>>>
313 ;; assignment
315 #:+=
316 #:-=
317 #:*=
318 #:/=
319 #:%=
320 #:&=
321 #:\|=
322 #:^=
323 #:~=
324 #:>>=
325 #:<<=
326 #:>>>=
328 ;; increment/decrement
329 #:++
330 #:--
331 #:post++
332 #:post--
334 ;; comparison
335 #:==
336 #:===
337 #:!=
338 #:!==
340 #:>=
342 #:<=
344 ;; logical
345 #:&&
346 #:\|\|
349 ;; misc
350 #:? ;; ternary
351 #:|,|
352 #:delete
353 #:function
354 #:get
355 #:in
356 #:instanceof
357 #:new
358 #:typeof
359 #:void
361 ;; literals
362 #:nil
365 #:undefined
366 #:this
368 ;; statements
369 #:block
370 #:break
371 #:continue
372 #:do-while
373 #:for
374 #:for-in
375 #:if
376 #:label
377 #:return
378 #:switch
379 #:default
380 #:throw
381 #:try
382 #:var
383 #:while
384 #:with
386 #:array
387 #:aref
388 #:cond
389 #:lambda
390 #:defun
391 #:object
392 #:getprop
393 #:funcall
394 #:escape
395 #:regex