The cl-jsx Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The cl-jsx Reference Manual

This is the cl-jsx Reference Manual, version 0.0.1, generated automatically by Declt version 2.3 "Robert April" on Tue Feb 20 08:07:35 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

CL-JSX

Quicklisp MIT License

JSX in Common Lisp

Embedded JSX syntax

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: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 cl-jsx

Author

Mariano Montone <marianomontone@gmail.com>

License

MIT

Description

JSX in Common Lisp

Version

0.0.1

Dependencies
Source

cl-jsx.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 cl-jsx.asd

Location

cl-jsx.asd

Systems

cl-jsx (system)

Packages

cl-jsx-asd


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 cl-jsx/packages.lisp

Parent

cl-jsx (system)

Location

packages.lisp

Packages

cl-jsx


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.3 cl-jsx/parser.lisp

Dependency

packages.lisp (file)

Parent

cl-jsx (system)

Location

parser.lisp

Packages

jsx.parser

Exported Definitions

parse-jsx (function)

Internal Definitions

flatten-content (function)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.4 cl-jsx/who.lisp

Dependency

parser.lisp (file)

Parent

cl-jsx (system)

Location

who.lisp

Packages

jsx.who

Exported Definitions

emit-who (function)

Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

3.1.5 cl-jsx/cl-jsx.lisp

Dependency

who.lisp (file)

Parent

cl-jsx (system)

Location

cl-jsx.lisp

Exported Definitions

enable-jsx-syntax (function)

Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

4.1 cl-jsx-asd

Source

cl-jsx.asd

Use List

Next: , Previous: , Up: Packages   [Contents][Index]

4.2 cl-jsx

Source

packages.lisp (file)

Nickname

jsx

Use List

common-lisp

Exported Definitions

enable-jsx-syntax (function)

Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

4.3 jsx.parser

Source

parser.lisp (file)

Use List
Exported Definitions

parse-jsx (function)

Internal Definitions

flatten-content (function)


Previous: , Up: Packages   [Contents][Index]

4.4 jsx.who

Source

who.lisp (file)

Use List

common-lisp

Exported Definitions

emit-who (function)

Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Functions

Function: emit-who JSX
Package

jsx.who

Source

who.lisp (file)

Function: enable-jsx-syntax ()
Package

cl-jsx

Source

cl-jsx.lisp (file)

Function: parse-jsx TEXT &rest ARGS &key START END JUNK-ALLOWED RAW
Package

jsx.parser

Source

parser.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Special variables

Special Variable: *spliced-read*
Package

jsx.who

Source

who.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Functions

Function: emit-attribute-value VALUE
Package

jsx.who

Source

who.lisp (file)

Function: emit-attributes ATTRIBUTES
Package

jsx.who

Source

who.lisp (file)

Function: emit-content CONTENT
Package

jsx.who

Source

who.lisp (file)

Function: flatten-content CONTENT
Package

jsx.parser

Source

parser.lisp (file)

Function: make-keyword STRING
Package

jsx.who

Source

who.lisp (file)

Function: read-escaped-jsx STRING
Package

jsx.who

Source

who.lisp (file)

Function: read-jsx STREAM &key PARSE-OPEN
Package

cl-jsx

Source

cl-jsx.lisp (file)

Function: read-jsx-content STREAM CONTENT &key PARSE-OPEN
Package

cl-jsx

Source

cl-jsx.lisp (file)

Function: read-until-close-tag TAG-NAME STREAM CONTENT
Package

cl-jsx

Source

cl-jsx.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Generic functions

Generic Function: %emit-who ELEMENT-TYPE ELEMENT
Package

jsx.who

Source

who.lisp (file)

Methods
Method: %emit-who (TYPE (eql element)) ELEMENT

Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   C   F   L  
Index Entry  Section

C
cl-jsx.asd: The cl-jsx<dot>asd file
cl-jsx/cl-jsx.lisp: The cl-jsx/cl-jsx<dot>lisp file
cl-jsx/packages.lisp: The cl-jsx/packages<dot>lisp file
cl-jsx/parser.lisp: The cl-jsx/parser<dot>lisp file
cl-jsx/who.lisp: The cl-jsx/who<dot>lisp file

F
File, Lisp, cl-jsx.asd: The cl-jsx<dot>asd file
File, Lisp, cl-jsx/cl-jsx.lisp: The cl-jsx/cl-jsx<dot>lisp file
File, Lisp, cl-jsx/packages.lisp: The cl-jsx/packages<dot>lisp file
File, Lisp, cl-jsx/parser.lisp: The cl-jsx/parser<dot>lisp file
File, Lisp, cl-jsx/who.lisp: The cl-jsx/who<dot>lisp file

L
Lisp File, cl-jsx.asd: The cl-jsx<dot>asd file
Lisp File, cl-jsx/cl-jsx.lisp: The cl-jsx/cl-jsx<dot>lisp file
Lisp File, cl-jsx/packages.lisp: The cl-jsx/packages<dot>lisp file
Lisp File, cl-jsx/parser.lisp: The cl-jsx/parser<dot>lisp file
Lisp File, cl-jsx/who.lisp: The cl-jsx/who<dot>lisp file

Jump to:   C   F   L  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   %  
E   F   G   M   P   R  
Index Entry  Section

%
%emit-who: Internal generic functions
%emit-who: Internal generic functions

E
emit-attribute-value: Internal functions
emit-attributes: Internal functions
emit-content: Internal functions
emit-who: Exported functions
enable-jsx-syntax: Exported functions

F
flatten-content: Internal functions
Function, emit-attribute-value: Internal functions
Function, emit-attributes: Internal functions
Function, emit-content: Internal functions
Function, emit-who: Exported functions
Function, enable-jsx-syntax: Exported functions
Function, flatten-content: Internal functions
Function, make-keyword: Internal functions
Function, parse-jsx: Exported functions
Function, read-escaped-jsx: Internal functions
Function, read-jsx: Internal functions
Function, read-jsx-content: Internal functions
Function, read-until-close-tag: Internal functions

G
Generic Function, %emit-who: Internal generic functions

M
make-keyword: Internal functions
Method, %emit-who: Internal generic functions

P
parse-jsx: Exported functions

R
read-escaped-jsx: Internal functions
read-jsx: Internal functions
read-jsx-content: Internal functions
read-until-close-tag: Internal functions

Jump to:   %  
E   F   G   M   P   R  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
S  
Index Entry  Section

*
*spliced-read*: Internal special variables

S
Special Variable, *spliced-read*: Internal special variables

Jump to:   *  
S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   J   P   S  
Index Entry  Section

C
cl-jsx: The cl-jsx system
cl-jsx: The cl-jsx package
cl-jsx-asd: The cl-jsx-asd package

J
jsx.parser: The jsx<dot>parser package
jsx.who: The jsx<dot>who package

P
Package, cl-jsx: The cl-jsx package
Package, cl-jsx-asd: The cl-jsx-asd package
Package, jsx.parser: The jsx<dot>parser package
Package, jsx.who: The jsx<dot>who package

S
System, cl-jsx: The cl-jsx system

Jump to:   C   J   P   S