-;; Description:
-;; Javascript html generator
+;;; Macros for generating HTML from ParenScript code.
(in-package :parenscript)
(map nil #'handle-form forms))
(cons '+ (optimize-string-list (nreverse res)))))
-(define-ps-special-form html (expecting &rest forms)
+(define-ps-special-form ps-html (expecting &rest forms)
(compile-parenscript-form (process-html-forms forms)))
(defun process-css-forms (proplist)
(in-package :cl-user)
-;;;; Package definitions for the Parenscript
-;; #:
-(eval-when (:compile-toplevel :load-toplevel)
- ;; exports shared between PARENSCRIPT and PARENSCRIPT.JAVASCRIPT
- (defparameter *shared-symbols-ps-js*
+(eval-when (:compile-toplevel :load-toplevel :execute)
+ (defparameter *parenscript-lang-exports*
'(
;; literals
#:t
#:\|\| #:or
#:>>= #:<<=
#:*= #:/= #:%= #:+= #:\&= #:^= #:\|= #:~=
- #:++ #:--
#:1+ #:1-
#:incf #:decf
#:instanceof
#:new
- ;; assignment
+ ;; assignment and binding
#:setf
+ #:defaultf
+ #:defsetf
+ #:let
;; variables
#:defvar
#:regex
;; conditional compilation (IE)
- #:cc-if)
- "Symbols exported from both the Parenscript and Javascript packages
-that are also valid as Parenscript symbols for the corresponding script packages."))
-
-(eval-when (:compile-toplevel :load-toplevel :execute)
- (defparameter *parenscript-lang-exports*
- (append
- *shared-symbols-ps-js*
- '(
- ;; function definition
- #:defun
- #:lambda
+ #:cc-if
+
+ ;; function definition
+ #:defun
+ #:lambda
- ;; lambda lists
- #:&key
- #:&rest
- #:&body
- #:&optional
- #:&aux
- #:&environment
- #:&key-object
+ ;; lambda lists
+ #:&key
+ #:&rest
+ #:&body
+ #:&optional
+ #:&aux
+ #:&environment
+ #:&key-object
- ;; slot access
- #:with-slots
- #:slot-value
+ ;; slot access
+ #:with-slots
+ #:slot-value
- ;; macros
- #:macrolet
- #:symbol-macrolet
- #:define-symbol-macro
- #:define-script-symbol-macro
- #:defmacro
-
- ;; lisp eval
- #:lisp
+ ;; macros
+ #:macrolet
+ #:symbol-macrolet
+ #:define-symbol-macro
+ #:define-script-symbol-macro
+ #:defmacro
- ;; assignment
- #:setf
- #:defaultf
-
- #:let
+ ;; lisp eval
+ #:lisp
- ;; iteration
- #:do
- #:dotimes
- #:dolist
- #:doeach
- #:while
+ ;; iteration
+ #:do
+ #:dotimes
+ #:dolist
+ #:doeach
+ #:while
- ;; v v v STUFF WE SHOULD PROBABLY MOVE TO OTHER LIBS v v v
+ ;; v v v STUFF WE SHOULD PROBABLY MOVE TO OTHER LIBS v v v
- ;; CSS
- #:css
- #:css-to-string
- #:css-inline
- #:css-file
+ ;; CSS
+ #:css
+ #:css-to-string
+ #:css-inline
+ #:css-file
- ;; html generator for javascript
- #:html
+ ;; html generator for javascript
+ #:ps-html
- ;; utils
- #:do-set-timeout
- ))
- "List of (uninterned) symbols. Contains all symbols considerred
-part of the Parenscript language. These should be exported within
-both the Lisp package and the script package for Parenscript."))
+ ;; utils
+ #:do-set-timeout
+ ))
+ "All symbols considerred part of the Parenscript language.")
(defpackage :parenscript
(:use :common-lisp)
(:nicknames :js :ps)
- #.(cons :export *shared-symbols-ps-js*)
#.(cons :export *parenscript-lang-exports*)
+
+ ;;; symbols that form the interface to the Parenscript compiler
(:export
;; compiler
#:compile-script