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