Added NEWS file with initial release timeline
[parenscript.git] / src / package.lisp
blob65a9574addf463841baca84a9f29502f98649584
1 ;;;; -*- encoding:utf-8 -*-
3 ;;; Copyright 2005 Manuel Odendahl
4 ;;; Copyright 2005-2006 Edward Marco Baringer
5 ;;; Copyright 2006 Luca Capello
6 ;;; Copyright 2006 Atilla Lendvai
7 ;;; Copyright 2007-2012 Vladimir Sedach
8 ;;; Copyright 2007 Red Daly
9 ;;; Copyright 2008 Travis Cross
11 ;;; SPDX-License-Identifier: BSD-3-Clause
13 ;;; Redistribution and use in source and binary forms, with or
14 ;;; without modification, are permitted provided that the following
15 ;;; conditions are met:
17 ;;; 1. Redistributions of source code must retain the above copyright
18 ;;; notice, this list of conditions and the following disclaimer.
20 ;;; 2. Redistributions in binary form must reproduce the above
21 ;;; copyright notice, this list of conditions and the following
22 ;;; disclaimer in the documentation and/or other materials provided
23 ;;; with the distribution.
25 ;;; 3. Neither the name of the copyright holder nor the names of its
26 ;;; contributors may be used to endorse or promote products derived
27 ;;; from this software without specific prior written permission.
29 ;;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
30 ;;; CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
31 ;;; INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
32 ;;; MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
33 ;;; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
34 ;;; BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
35 ;;; EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
36 ;;; TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
37 ;;; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
38 ;;; ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
39 ;;; OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
40 ;;; OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 ;;; POSSIBILITY OF SUCH DAMAGE.
43 (in-package #:cl)
45 (pushnew :parenscript *features*)
47 (eval-when (:compile-toplevel :load-toplevel :execute)
48 (unless (named-readtables:find-readtable :parenscript)
49 (named-readtables:defreadtable :parenscript
50 (:merge :standard)
51 (:case #.(if (eql :upcase (readtable-case *readtable*))
52 :invert
53 (readtable-case *readtable*))))))
55 (named-readtables:in-readtable :parenscript)
57 (defpackage #:parenscript
58 (:use #:cl #:anaphora)
59 (:nicknames #:ps)
60 (:export
61 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
62 ;;; Compiler interface
64 ;; compiler
65 #:*js-target-version*
66 #:ps
67 #:*parenscript-stream*
68 #:ps-to-stream
69 #:ps-doc
70 #:ps-doc*
71 #:ps*
72 #:ps-inline
73 #:ps-inline*
74 #:*ps-read-function*
75 #:ps-compile-file
76 #:ps-compile-stream
77 ;; for parenscript macro definition within lisp
78 #:defpsmacro
79 #:defmacro+ps
80 #:import-macros-from-lisp
81 #:*defined-operators*
82 #:*version*
84 ;; gensym
85 #:ps-gensym
86 #:with-ps-gensyms
87 #:ps-once-only
88 #:maybe-once-only
89 #:*ps-gensym-counter*
91 ;; naming and namespaces
92 #:in-package
93 #:use-package
94 #:ps-package-prefix
95 #:obfuscate-package
96 #:unobfuscate-package
98 ;; printer
99 #:symbol-to-js-string
100 #:*js-string-delimiter*
101 #:*js-inline-string-delimiter*
102 #:*ps-print-pretty*
103 #:*indent-num-spaces*
105 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
106 ;;; Language
108 ;; literals
110 #:nil
112 ;; array literals
113 #:array
114 #:list
115 #:aref
116 #:elt
117 #:make-array
118 #:[]
120 ;; operators
121 ;; logical boolean
122 #:not
123 #:and
124 #:or
126 ;; bitwise boolean
127 #:logand
128 #:logior
129 #:logxor
130 #:lognot
131 #:ash
135 #:rem
136 #:mod
141 #:<=
142 #:>=
143 #:incf
144 #:decf
145 #:equal
146 #:eql
147 #:eq
150 ;; compile-time stuff
151 #:eval-when
153 ;; body forms
154 #:progn
156 ;; if
157 #:if
158 #:when
159 #:unless
161 ;; control flow
162 #:return
163 #:return-from
164 #:throw
166 ;; assignment and binding
167 #:setf
168 #:defsetf
169 #:psetf
170 #:setq
171 #:psetq
172 #:let*
173 #:let
175 ;; variables
176 #:defvar
178 ;; iteration
179 #:do
180 #:do*
181 #:dotimes
182 #:dolist
183 #:loop
185 ;; case
186 #:switch
187 #:case
188 #:default
190 ;; function definition
191 #:defun
192 #:lambda
193 #:flet
194 #:labels
196 ;; lambda lists
197 #:&key
198 #:&rest
199 #:&body
200 #:&optional
201 #:&aux
202 #:&environment
203 #:&key-object
205 ;; macros
206 #:macrolet
207 #:symbol-macrolet
208 #:define-symbol-macro
209 #:define-ps-symbol-macro
210 #:defmacro
212 ;; utils
213 #:max
214 #:min
215 #:floor
216 #:ceiling
217 #:round
218 #:sin
219 #:cos
220 #:tan
221 #:asin
222 #:acos
223 #:atan
224 #:pi
225 #:sinh
226 #:cosh
227 #:tanh
228 #:asinh
229 #:acosh
230 #:atanh
231 #:1+
232 #:1-
233 #:abs
234 #:evenp
235 #:oddp
236 #:exp
237 #:expt
238 #:log
239 #:sqrt
240 #:random
241 #:ignore-errors
242 #:concatenate
243 #:length
244 #:stringp
245 #:numberp
246 #:functionp
247 #:append
248 #:apply
249 #:destructuring-bind
251 ;; js runtime utils
252 #:*ps-lisp-library*
253 #:mapcar
254 #:map-into
255 #:map
256 #:member
257 #:append
258 #:set-difference
260 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
261 ;;; Non-Common Lisp functionality
263 ;; DOM accessing utils
264 #:inner-html
265 #:uri-encode
266 #:attribute
267 #:offset
268 #:scroll
269 #:inner
270 #:client
272 ;; utils
274 #:chain
275 #:defined
276 #:undefined
277 #:booleanp
278 #:objectp
279 #:stringify
281 ;; html generator for javascript
282 #:*ps-html-empty-tag-aware-p*
283 #:*ps-html-mode*
284 #:ps-html
285 #:who-ps-html
287 ;; lisp eval
288 #:lisp
290 ;; js object stuff
291 #:delete
292 #:typeof
293 #:instanceof
294 #:new
295 #:create
297 ;; slot access
298 #:with-slots
299 #:getprop
300 #:in
302 ;; literals
303 #:regex
304 #:this
305 #:undefined
306 #:{}
307 #:false
309 ;; iteration
310 #:for
311 #:for-in
312 #:while
314 ;; global var
315 #:var
317 ;; control flow
318 #:try
319 #:break
320 #:continue
322 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
323 ;;; Deprecated functionality
325 #:define-script-symbol-macro
326 #:gen-js-name
327 #:with-unique-js-names
328 #:defjsmacro
329 #:js-compile
330 #:js-inline
331 #:js-inline*
332 #:js
333 #:js*
334 #:symbol-to-js
335 #:slot-value
336 #:compile-script
337 #:defmacro/ps
339 #:==
340 #:===
341 #:!=
342 #:!==
343 #:labeled-for
344 #:do-set-timeout
345 #:concat-string
346 #:with
347 #:label
349 #:bind
350 #:bind*