Renamed src/lib Parenscript library files, got rid of Parenscript CSS system.
[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 '(
6 ;; literals
7 #:t
8 #:f
9 #:true
10 #.(symbol-name 'nil) ;; for case-sensitive Lisps like some versions of Allegro
11 #:this
12 #:false
13 #:undefined
14
15 ;; keywords
16 #:break
17 #:continue
18
19 ;; array literals
20 #:array
21 #:list
22 #:aref
23 #:make-array
24
25 ;; operators
26 #:! #:not #:~
27 #:* #:/ #:%
28 #:+ #:-
29 #:<< #:>>
30 #:>>>
31 #:< #:> #:<= #:>=
32 #:in
33 #:eql #:== #:!= #:=
34 #:=== #:!==
35 #:&
36 #:^
37 #:\|
38 #:\&\& #:and
39 #:\|\| #:or
40 #:>>= #:<<=
41 #:*= #:/= #:%= #:+= #:\&= #:^= #:\|= #:~=
42 #:1+ #:1-
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 #:let*
76 #:lexical-let*
77
78 ;; variables
79 #:var
80 #:defvar
81
82 ;; iteration
83 #:for
84 #:doeach
85 #:while
86
87 ;; with
88 #:with
89
90 ;; case
91 #:switch
92 #:case
93 #:default
94
95 ;; try throw catch
96 #:try
97
98 ;; regex literals
99 #:regex
100
101 ;; conditional compilation (IE)
102 #:cc-if
103
104 ;; function definition
105 #:defun
106 #:lambda
107
108 ;; lambda lists
109 #:&key
110 #:&rest
111 #:&body
112 #:&optional
113 #:&aux
114 #:&environment
115 #:&key-object
116
117 ;; slot access
118 #:with-slots
119 #:slot-value
120
121 ;; macros
122 #:macrolet
123 #:symbol-macrolet
124 #:define-symbol-macro
125 #:define-script-symbol-macro
126 #:defmacro
127
128 ;; lisp eval
129 #:lisp
130
131 ;; iteration
132 #:do
133 #:dotimes
134 #:dolist
135 #:doeach
136 #:while
137
138 ;; v v v STUFF WE SHOULD PROBABLY MOVE TO OTHER LIBS v v v
139
140 ;; html generator for javascript
141 #:ps-html
142
143 ;; utils
144 #:do-set-timeout
145 #:min
146 #:max
147 #:ceiling
148 #:abs
149 #:sin
150 #:cos
151 #:tan
152 #:acos
153 #:asin
154 #:atan
155 #:exp
156 #:floor
157 #:expt
158 #:round
159 #:random
160 #:oddp
161 #:evenp
162 #:ignore-errors
163 #:length
164 #:null
165 #:@
166
167 ;; js runtime utils
168 #:*ps-lisp-library*
169 #:mapcar
170 #:map-into
171 #:map
172 #:map-until
173 #:member
174 #:append
175 #:set-difference
176 ))
177 "All symbols considerred part of the Parenscript language.")
178
179 (defpackage :parenscript
180 (:use :common-lisp)
181 (:nicknames :js :ps)
182 #.(cons :export *parenscript-lang-exports*)
183
184 ;;; symbols that form the interface to the Parenscript compiler
185 (:export
186 ;; compiler
187 #:compile-script
188 #:ps
189 #:ps*
190 #:ps-inline
191 #:ps-inline*
192
193 ;; for parenscript macro definition within lisp
194 #:defpsmacro
195 #:defmacro/ps
196 #:defmacro+ps
197 #:import-macros-from-lisp
198
199 ;; gensym
200 #:ps-gensym
201 #:with-ps-gensyms
202 #:*ps-gensym-counter*
203
204 ;; naming and namespaces
205 #:ps-package-prefix
206 #:obfuscate-package
207 #:unobfuscate-package
208
209 ;; printer
210 #:*js-string-delimiter*
211 #:*js-inline-string-delimiter*
212 #:*ps-print-pretty*
213 #:*indent-num-spaces*
214
215 ;; deprecated interface
216 #:gen-js-name
217 #:gen-js-name-string
218 #:with-unique-js-names
219 #:defjsmacro
220 #:js-compile
221 #:js-inline
222 #:js-inline*
223 #:js-file
224 #:js-script
225 #:js-to-statement-strings
226 #:js
227 #:js*
228 #:let
229 ))
230
231 (defpackage :parenscript-special-forms
232 (:use))