Added an implementation of 'elt' to ps-macro-lib.
[clinton/parenscript.git] / src / package.lisp
CommitLineData
8e198a08 1(in-package :cl-user)
171bbab3 2
d31d0bc7
VS
3(eval-when (:compile-toplevel :load-toplevel :execute)
4 (defparameter *parenscript-lang-exports*
b73376a5 5 '(;; literals
171bbab3
RD
6 #:t
7 #:f
8 #:true
45c9f9c2 9 #.(symbol-name 'nil) ; for case-sensitive Lisps like some versions of Allegro
171bbab3
RD
10 #:this
11 #:false
12 #:undefined
72044f33 13 #:{}
d3c4afa2 14
171bbab3
RD
15 ;; keywords
16 #:break
17 #:continue
d3c4afa2 18
171bbab3
RD
19 ;; array literals
20 #:array
21 #:list
22 #:aref
ce44c98c 23 #:elt
171bbab3 24 #:make-array
06ed0d3a 25 #:[]
d3c4afa2 26
171bbab3
RD
27 ;; operators
28 #:! #:not #:~
29 #:* #:/ #:%
30 #:+ #:-
31 #:<< #:>>
32 #:>>>
33 #:< #:> #:<= #:>=
34 #:in
35 #:eql #:== #:!= #:=
36 #:=== #:!==
37 #:&
38 #:^
39 #:\|
40 #:\&\& #:and
41 #:\|\| #:or
42 #:>>= #:<<=
43 #:*= #:/= #:%= #:+= #:\&= #:^= #:\|= #:~=
171bbab3 44 #:incf #:decf
d3c4afa2 45
171bbab3
RD
46 ;; body forms
47 #:progn
d3c4afa2 48
171bbab3
RD
49 ;; object literals
50 #:create
171bbab3 51 #:with-slots
d3c4afa2 52
171bbab3
RD
53 ;; macros
54 #:macrolet
55 #:symbol-macrolet
d3c4afa2 56
171bbab3
RD
57 ;; if
58 #:if
59 #:when
60 #:unless
d3c4afa2 61
171bbab3
RD
62 ;; single argument statements
63 #:return
64 #:throw
d3c4afa2 65
171bbab3
RD
66 ;; single argument expressions
67 #:delete
68 #:void
69 #:typeof
70 #:instanceof
71 #:new
d3c4afa2 72
d31d0bc7 73 ;; assignment and binding
171bbab3 74 #:setf
d31d0bc7 75 #:defsetf
1fe28ee1 76 #:psetf
ec227186
TC
77 #:setq
78 #:psetq
b5cf9e71 79 #:simple-let*
ca25a40e 80 #:simple-let
58c4ef4f 81 #:lexical-let*
3530f5e1 82 #:lexical-let
613457a0
TC
83 #:let*
84 #:let
d3c4afa2 85
171bbab3 86 ;; variables
58c4ef4f 87 #:var
171bbab3 88 #:defvar
d3c4afa2 89
171bbab3 90 ;; iteration
6a2ce72d 91 #:labeled-for
171bbab3 92 #:for
6a2ce72d 93 #:for-in
171bbab3 94 #:while
613457a0
TC
95 #:do
96 #:do*
97 #:dotimes
98 #:dolist
99 #:doeach
d3c4afa2 100
171bbab3
RD
101 ;; with
102 #:with
d3c4afa2 103
171bbab3
RD
104 ;; case
105 #:switch
106 #:case
107 #:default
d3c4afa2 108
171bbab3
RD
109 ;; try throw catch
110 #:try
d3c4afa2 111
171bbab3
RD
112 ;; regex literals
113 #:regex
d3c4afa2 114
171bbab3 115 ;; conditional compilation (IE)
d31d0bc7 116 #:cc-if
d3c4afa2 117
d31d0bc7
VS
118 ;; function definition
119 #:defun
120 #:lambda
d3c4afa2 121
d31d0bc7
VS
122 ;; lambda lists
123 #:&key
124 #:&rest
125 #:&body
126 #:&optional
127 #:&aux
128 #:&environment
129 #:&key-object
46f794a4 130
d31d0bc7
VS
131 ;; slot access
132 #:with-slots
133 #:slot-value
46f794a4 134
d31d0bc7
VS
135 ;; macros
136 #:macrolet
137 #:symbol-macrolet
138 #:define-symbol-macro
386ecd2f 139 #:define-ps-symbol-macro
d31d0bc7 140 #:defmacro
d3c4afa2 141
d31d0bc7
VS
142 ;; lisp eval
143 #:lisp
d3c4afa2 144
d31d0bc7 145 ;; v v v STUFF WE SHOULD PROBABLY MOVE TO OTHER LIBS v v v
171bbab3 146
d31d0bc7
VS
147 ;; html generator for javascript
148 #:ps-html
1937c30a 149 #:who-ps-html
dbb7017b 150
d31d0bc7
VS
151 ;; utils
152 #:do-set-timeout
c72e87d8 153 #:max
4b6e50d2
TC
154 #:min
155 #:floor
c72e87d8 156 #:ceiling
4b6e50d2 157 #:round
c72e87d8
VS
158 #:sin
159 #:cos
160 #:tan
c72e87d8 161 #:asin
4b6e50d2 162 #:acos
c72e87d8 163 #:atan
58f3113d 164 #:pi
7a5c62dc
TC
165 #:sinh
166 #:cosh
167 #:tanh
168 #:asinh
169 #:acosh
170 #:atanh
4b6e50d2
TC
171 #:1+
172 #:1-
173 #:abs
174 #:evenp
175 #:oddp
c72e87d8 176 #:exp
c72e87d8 177 #:expt
4b6e50d2 178 #:log
a7b7afae 179 #:sqrt
c72e87d8 180 #:random
c72e87d8 181 #:ignore-errors
d5c9059a 182 #:concatenate
bb8ba95a 183 #:concat-string
c72e87d8
VS
184 #:length
185 #:null
186 #:@
187
352621e1 188 ;; js runtime utils
c72e87d8
VS
189 #:*ps-lisp-library*
190 #:mapcar
352621e1
VS
191 #:map-into
192 #:map
193 #:map-until
194 #:member
195 #:append
196 #:set-difference
b73376a5
TC
197 ))
198 (defparameter *parenscript-interface-exports*
199 '(;; compiler
200 #:compile-script
201 #:ps
202 #:ps-doc
203 #:ps*
204 #:ps-inline
205 #:ps-inline*
206
207 ;; for parenscript macro definition within lisp
208 #:defpsmacro
209 #:defmacro/ps
210 #:defmacro+ps
211 #:import-macros-from-lisp
212
213 ;; gensym
214 #:ps-gensym
215 #:with-ps-gensyms
216 #:ps-once-only
217 #:*ps-gensym-counter*
218
219 ;; naming and namespaces
220 #:ps-package-prefix
221 #:obfuscate-package
222 #:unobfuscate-package
223
224 ;; printer
6274a448 225 #:symbol-to-js-string
b73376a5
TC
226 #:*js-string-delimiter*
227 #:*js-inline-string-delimiter*
228 #:*ps-print-pretty*
229 #:*indent-num-spaces*
230 ))
231 (defparameter *parenscript-interface-deprecated-exports*
232 '(;; deprecated interface
b65b21c2 233 #:define-script-symbol-macro
b73376a5
TC
234 #:gen-js-name
235 #:with-unique-js-names
236 #:defjsmacro
237 #:js-compile
238 #:js-inline
239 #:js-inline*
240 #:js
241 #:js*
242 ))
243 )
171bbab3 244
5aa10005 245(defpackage :parenscript
4a987e2b 246 (:use :common-lisp)
9da682ca 247 (:nicknames :js :ps)
171bbab3 248 #.(cons :export *parenscript-lang-exports*)
b73376a5
TC
249 #.(cons :export *parenscript-interface-exports*)
250 #.(cons :export *parenscript-interface-deprecated-exports*)
251 )
f326f929 252