Introduced special global variables to Parenscript; renamed let and lexical-let to...
[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*
171bbab3
RD
5 '(
6 ;; literals
7 #:t
8 #:f
9 #:true
6f093623 10 #.(symbol-name 'nil) ;; for case-sensitive Lisps like some versions of Allegro
171bbab3
RD
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 #:*= #:/= #:%= #:+= #:\&= #:^= #:\|= #:~=
171bbab3
RD
42 #:1+ #:1-
43 #:incf #:decf
44
45 ;; body forms
46 #:progn
47
171bbab3
RD
48 ;; object literals
49 #:create
171bbab3
RD
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
d31d0bc7 72 ;; assignment and binding
171bbab3 73 #:setf
d31d0bc7 74 #:defsetf
58c4ef4f
VS
75 #:let*
76 #:lexical-let*
171bbab3
RD
77
78 ;; variables
58c4ef4f 79 #:var
171bbab3
RD
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)
d31d0bc7
VS
102 #:cc-if
103
104 ;; function definition
105 #:defun
106 #:lambda
46f794a4 107
d31d0bc7
VS
108 ;; lambda lists
109 #:&key
110 #:&rest
111 #:&body
112 #:&optional
113 #:&aux
114 #:&environment
115 #:&key-object
46f794a4 116
d31d0bc7
VS
117 ;; slot access
118 #:with-slots
119 #:slot-value
46f794a4 120
d31d0bc7
VS
121 ;; macros
122 #:macrolet
123 #:symbol-macrolet
124 #:define-symbol-macro
125 #:define-script-symbol-macro
126 #:defmacro
171bbab3 127
d31d0bc7
VS
128 ;; lisp eval
129 #:lisp
171bbab3 130
d31d0bc7
VS
131 ;; iteration
132 #:do
133 #:dotimes
134 #:dolist
135 #:doeach
136 #:while
171bbab3 137
d31d0bc7 138 ;; v v v STUFF WE SHOULD PROBABLY MOVE TO OTHER LIBS v v v
171bbab3 139
d31d0bc7
VS
140 ;; CSS
141 #:css
142 #:css-to-string
143 #:css-inline
144 #:css-file
171bbab3 145
d31d0bc7
VS
146 ;; html generator for javascript
147 #:ps-html
dbb7017b 148
d31d0bc7
VS
149 ;; utils
150 #:do-set-timeout
c72e87d8
VS
151 #:min
152 #:max
153 #:ceiling
154 #:abs
155 #:sin
156 #:cos
157 #:tan
158 #:acos
159 #:asin
160 #:atan
161 #:exp
162 #:floor
163 #:expt
164 #:round
165 #:random
166 #:oddp
167 #:evenp
168 #:ignore-errors
169 #:length
170 #:null
171 #:@
172
173 ;; libries
174 #:*ps-lisp-library*
175 #:mapcar
d31d0bc7
VS
176 ))
177 "All symbols considerred part of the Parenscript language.")
171bbab3 178
5aa10005 179(defpackage :parenscript
4a987e2b 180 (:use :common-lisp)
9da682ca 181 (:nicknames :js :ps)
171bbab3 182 #.(cons :export *parenscript-lang-exports*)
d31d0bc7
VS
183
184 ;;; symbols that form the interface to the Parenscript compiler
8e198a08 185 (:export
8e198a08 186 ;; compiler
9da682ca 187 #:compile-script
7590646c
VS
188 #:ps
189 #:ps*
33c100f0
VS
190 #:ps-inline
191 #:ps-inline*
9da682ca
RD
192
193 ;; for parenscript macro definition within lisp
4a987e2b 194 #:defpsmacro
a19d2bde
VS
195 #:defmacro/ps
196 #:defmacro+ps
ca493d55 197 #:import-macros-from-lisp
0b7a1d2f 198
7590646c 199 ;; gensym
4a987e2b
VS
200 #:ps-gensym
201 #:with-ps-gensyms
202 #:*ps-gensym-counter*
551080b7 203
edfaa07b 204 ;; naming and namespaces
edfaa07b 205 #:ps-package-prefix
0c542be0
VS
206 #:obfuscate-package
207 #:unobfuscate-package
edfaa07b 208
c639fe7f
VS
209 ;; printer
210 #:*js-string-delimiter*
211 #:*js-inline-string-delimiter*
212 #:*ps-print-pretty*
213 #:*indent-num-spaces*
214
9da682ca 215 ;; deprecated interface
7590646c
VS
216 #:gen-js-name
217 #:gen-js-name-string
218 #:with-unique-js-names
9da682ca
RD
219 #:defjsmacro
220 #:js-compile
9da682ca
RD
221 #:js-inline
222 #:js-inline*
223 #:js-file
224 #:js-script
9da682ca 225 #:js-to-statement-strings
4a987e2b
VS
226 #:js
227 #:js*
58c4ef4f 228 #:let
171bbab3 229 ))
f326f929
VS
230
231(defpackage :parenscript-special-forms
232 (:use))