Changeset 9765 in project


Ignore:
Timestamp:
03/15/08 20:55:32 (12 years ago)
Author:
Kon Lovett
Message:

Save.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/3/hart/trunk/hart-support.scm

    r9764 r9765  
    5858(define (hart-parse-form form)
    5959  (match form
    60          ('() (noop))
    61          ((? number?)
    62            (hart-emit (hart-html-escape form)))
    63          ((? string?)
    64            (hart-emit (hart-html-escape form)))
    65          ((? symbol? x)
    66            (hart-emit-single-tag x))
    67          (((? keyword? x) . rest)
    68           (hart-parse-keyword-form form))
    69          (((? symbol? x) . rest)
    70           (hart-parse-xml-form form))
    71          ))
     60    ('()
     61     (noop))
     62    ((? number?)
     63     (hart-emit (hart-html-escape form)))
     64    ((? string?)
     65     (hart-emit (hart-html-escape form)))
     66    ((? symbol? x)
     67     (hart-emit-single-tag x))
     68    (((? keyword? x) . rest)
     69     (hart-parse-keyword-form form))
     70    (((? symbol? x) . rest)
     71     (hart-parse-xml-form form)) ) )
    7272
    7373(define (hart-parse-xml-form form)
    7474  (match form
    75          ((tag) (hart-emit-single-tag tag))
    76          ((tag ('@ . attrs))
    77           (hart-emit-single-tag tag attrs))
    78          ((tag ('@ . attrs) . body)
    79           (hart-emit-opening-tag tag attrs)
    80           (map (lambda (form) (hart-parse-form form)) body)
    81           (hart-emit-closing-tag tag))
    82          ((tag . body)
    83           (hart-emit-opening-tag tag '())
    84           (map (lambda (form) (hart-parse-form form)) body)
    85           (hart-emit-closing-tag tag))
    86          ))
     75    ((tag)
     76     (hart-emit-single-tag tag))
     77    ((tag ('@ . attrs))
     78     (hart-emit-single-tag tag attrs))
     79    ((tag ('@ . attrs) . body)
     80     (hart-emit-opening-tag tag attrs)
     81     (map (lambda (form) (hart-parse-form form)) body)
     82     (hart-emit-closing-tag tag))
     83    ((tag . body)
     84     (hart-emit-opening-tag tag '())
     85     (map (lambda (form) (hart-parse-form form)) body)
     86     (hart-emit-closing-tag tag)) ) )
    8787
    8888
Note: See TracChangeset for help on using the changeset viewer.