Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the cl-jsx Reference Manual, version 0.0.1, generated automatically by Declt version 3.0 "Montgomery Scott" on Tue Dec 22 12:26:39 2020 GMT+0.
• Introduction | What cl-jsx is all about | |
• Systems | The systems documentation | |
• Files | The files documentation | |
• Packages | The packages documentation | |
• Definitions | The symbols documentation | |
• Indexes | Concepts, functions, variables and data types |
JSX in Common Lisp
To enable JSX syntax, evaluate:
(jsx:enable-jsx-syntax)
JSX elements are specified with #<tag></tag>
Example:
(who:with-html-output-to-string (html)
(let ((hello "asdf"))
#<lala aaa="asd {when nil "false"}" yes={hello}>
{loop
for x from 1 to 10
do #<p class="{when t "asdf"}">{hello}</p>}
</lala>))
Result:
=> "<lala aaa='asd ' yes='asdf'>
<p class='asdf'>asdf</p><p class='asdf'>asdf</p><p class='asdf'>asdf</p><p class='asdf'>asdf</p><p class='asdf'>asdf</p><p class='asdf'>asdf</p><p class='asdf'>asdf</p><p class='asdf'>asdf</p><p class='asdf'>asdf</p><p class='asdf'>asdf</p>
</lala>"
At the moment, the rendering is done using CL-WHO, but other backends implementations are also possible:
Macro expansion of JSX above:
(WITH-OUTPUT-TO-STRING (HTML NIL)
(CL-WHO:WITH-HTML-OUTPUT (HTML NIL :PROLOGUE NIL :INDENT NIL)
(LET ((HELLO "asdf"))
(PROGN
(CL-WHO:HTM
(:LALA :AAA
(WITH-OUTPUT-TO-STRING (#:ATTR755)
(WRITE-STRING "asd " #:ATTR755)
(LET ((#:ATTRVAL756 (WHEN NIL "false")))
(WHEN #:ATTRVAL756 (PRINC #:ATTRVAL756 #:ATTR755))))
:YES HELLO
(CL-WHO:STR "
")
(CL-WHO:STR
(LOOP FOR X FROM 1 TO 10
DO (PROGN
(CL-WHO:HTM
(:P :CLASS
(WITH-OUTPUT-TO-STRING (#:ATTR757)
(LET ((#:ATTRVAL758 (WHEN T "asdf")))
(WHEN #:ATTRVAL758 (PRINC #:ATTRVAL758 #:ATTR757))))
(CL-WHO:STR HELLO)))
NIL)))
(CL-WHO:STR "
")))
NIL))))
Next: Files, Previous: Introduction, Up: Top [Contents][Index]
The main system appears first, followed by any subsystem dependency.
• The cl-jsx system |
Mariano Montone <marianomontone@gmail.com>
MIT
JSX in Common Lisp
0.0.1
cl-jsx.asd (file)
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files |
• The cl-jsx.asd file | ||
• The cl-jsx/packages.lisp file | ||
• The cl-jsx/parser.lisp file | ||
• The cl-jsx/who.lisp file | ||
• The cl-jsx/cl-jsx.lisp file |
Next: The cl-jsx/packages․lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
cl-jsx.asd
cl-jsx (system)
Next: The cl-jsx/parser․lisp file, Previous: The cl-jsx․asd file, Up: Lisp files [Contents][Index]
Next: The cl-jsx/who․lisp file, Previous: The cl-jsx/packages․lisp file, Up: Lisp files [Contents][Index]
packages.lisp (file)
cl-jsx (system)
parser.lisp
parse-jsx (function)
flatten-content (function)
Next: The cl-jsx/cl-jsx․lisp file, Previous: The cl-jsx/parser․lisp file, Up: Lisp files [Contents][Index]
parser.lisp (file)
cl-jsx (system)
who.lisp
emit-who (function)
Previous: The cl-jsx/who․lisp file, Up: Lisp files [Contents][Index]
who.lisp (file)
cl-jsx (system)
cl-jsx.lisp
enable-jsx-syntax (function)
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
• The cl-jsx-asd package | ||
• The cl-jsx package | ||
• The jsx.parser package | ||
• The jsx.who package |
Next: The cl-jsx package, Previous: Packages, Up: Packages [Contents][Index]
cl-jsx.asd
Next: The jsx․parser package, Previous: The cl-jsx-asd package, Up: Packages [Contents][Index]
packages.lisp (file)
jsx
common-lisp
enable-jsx-syntax (function)
Next: The jsx․who package, Previous: The cl-jsx package, Up: Packages [Contents][Index]
parser.lisp (file)
parse-jsx (function)
flatten-content (function)
Previous: The jsx․parser package, Up: Packages [Contents][Index]
who.lisp (file)
common-lisp
emit-who (function)
Definitions are sorted by export status, category, package, and then by lexicographic order.
• Exported definitions | ||
• Internal definitions |
Next: Internal definitions, Previous: Definitions, Up: Definitions [Contents][Index]
• Exported functions |
Previous: Exported definitions, Up: Exported definitions [Contents][Index]
cl-jsx.lisp (file)
parser.lisp (file)
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal special variables | ||
• Internal functions | ||
• Internal generic functions |
Next: Internal functions, Previous: Internal definitions, Up: Internal definitions [Contents][Index]
Next: Internal generic functions, Previous: Internal special variables, Up: Internal definitions [Contents][Index]
parser.lisp (file)
cl-jsx.lisp (file)
cl-jsx.lisp (file)
cl-jsx.lisp (file)
Previous: Internal functions, Up: Internal definitions [Contents][Index]
Previous: Definitions, Up: Top [Contents][Index]
• Concept index | ||
• Function index | ||
• Variable index | ||
• Data type index |
Next: Function index, Previous: Indexes, Up: Indexes [Contents][Index]
Jump to: | C F L |
---|
Jump to: | C F L |
---|
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | %
E F G M P R |
---|
Jump to: | %
E F G M P R |
---|
Next: Data type index, Previous: Function index, Up: Indexes [Contents][Index]
Jump to: | *
S |
---|
Index Entry | Section | ||
---|---|---|---|
| |||
* | |||
*spliced-read* : | Internal special variables | ||
| |||
S | |||
Special Variable, *spliced-read* : | Internal special variables | ||
|
Jump to: | *
S |
---|
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | C J P S |
---|
Jump to: | C J P S |
---|