Refactored Parenscript printer code.
[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
VS
74 #:defaultf
75 #:defsetf
76 #:let
171bbab3
RD
77
78 ;; variables
79 #:defvar
80
81 ;; iteration
82 #:for
83 #:doeach
84 #:while
85
86 ;; with
87 #:with
88
89 ;; case
90 #:switch
91 #:case
92 #:default
93
94 ;; try throw catch
95 #:try
96
97 ;; regex literals
98 #:regex
99
100 ;; conditional compilation (IE)
d31d0bc7
VS
101 #:cc-if
102
103 ;; function definition
104 #:defun
105 #:lambda
46f794a4 106
d31d0bc7
VS
107 ;; lambda lists
108 #:&key
109 #:&rest
110 #:&body
111 #:&optional
112 #:&aux
113 #:&environment
114 #:&key-object
46f794a4 115
d31d0bc7
VS
116 ;; slot access
117 #:with-slots
118 #:slot-value
46f794a4 119
d31d0bc7
VS
120 ;; macros
121 #:macrolet
122 #:symbol-macrolet
123 #:define-symbol-macro
124 #:define-script-symbol-macro
125 #:defmacro
171bbab3 126
d31d0bc7
VS
127 ;; lisp eval
128 #:lisp
171bbab3 129
d31d0bc7
VS
130 ;; iteration
131 #:do
132 #:dotimes
133 #:dolist
134 #:doeach
135 #:while
171bbab3 136
d31d0bc7 137 ;; v v v STUFF WE SHOULD PROBABLY MOVE TO OTHER LIBS v v v
171bbab3 138
d31d0bc7
VS
139 ;; CSS
140 #:css
141 #:css-to-string
142 #:css-inline
143 #:css-file
171bbab3 144
d31d0bc7
VS
145 ;; html generator for javascript
146 #:ps-html
dbb7017b 147
d31d0bc7
VS
148 ;; utils
149 #:do-set-timeout
150 ))
151 "All symbols considerred part of the Parenscript language.")
171bbab3 152
5aa10005 153(defpackage :parenscript
4a987e2b 154 (:use :common-lisp)
9da682ca 155 (:nicknames :js :ps)
171bbab3 156 #.(cons :export *parenscript-lang-exports*)
d31d0bc7
VS
157
158 ;;; symbols that form the interface to the Parenscript compiler
8e198a08 159 (:export
8e198a08 160 ;; compiler
9da682ca 161 #:compile-script
7590646c
VS
162 #:ps
163 #:ps*
33c100f0
VS
164 #:ps-inline
165 #:ps-inline*
9da682ca
RD
166
167 ;; for parenscript macro definition within lisp
4a987e2b 168 #:defpsmacro
a19d2bde
VS
169 #:defmacro/ps
170 #:defmacro+ps
ca493d55 171 #:import-macros-from-lisp
0b7a1d2f 172
7590646c 173 ;; gensym
4a987e2b
VS
174 #:ps-gensym
175 #:with-ps-gensyms
176 #:*ps-gensym-counter*
551080b7 177
edfaa07b 178 ;; naming and namespaces
edfaa07b 179 #:ps-package-prefix
0c542be0
VS
180 #:obfuscate-package
181 #:unobfuscate-package
edfaa07b 182
9da682ca 183 ;; deprecated interface
7590646c
VS
184 #:gen-js-name
185 #:gen-js-name-string
186 #:with-unique-js-names
9da682ca
RD
187 #:defjsmacro
188 #:js-compile
9da682ca
RD
189 #:js-inline
190 #:js-inline*
191 #:js-file
192 #:js-script
9da682ca 193 #:js-to-statement-strings
4a987e2b
VS
194 #:js
195 #:js*
171bbab3 196 ))