Changeset 8525 in project


Ignore:
Timestamp:
02/17/08 14:34:09 (12 years ago)
Author:
azul
Message:

Fix.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • stream-wiki/trunk/extensions/chicken.scm

    r8524 r8525  
    3838    (or
    3939      (and-let* ((name-stream (assoc 'name params))
    40                  (name (stream->string (cdr name-stream)))
     40                 (name (stream->string (cdr name-stream)))
    4141                 (description (assoc 'description params))
    4242                 (license (assoc 'license params))
     
    5050                (td (cdr license))
    5151                (td "[[" (cdr author) "]]")
    52                 (td "[[http://chicken.wiki.br/dep-graphs/" name ".png|Dependencies]]")))))
     52                (td "[[http://chicken.wiki.br/dep-graphs/" name ".png|Dependencies]]")))))
    5353      stream-null)))
    5454
     
    5757    (or
    5858      (and-let* ((name (assoc 'name params))
    59                  (retval (assoc 'retval params))
     59                 (returns (assoc 'returns params))
    6060                 (args (assoc 'args params)))
    6161        (parse
    6262          (html-stream
    6363            "=== name \n\n"
    64             "[procedure] {{( '''" name "''' " args ")}}\n\n"
    65             "Returns: {{" retval "}}\n\n"
     64            "[procedure] {{( '''" name "''' " args ")}}\n\n"
     65            "Returns: {{" returns "}}\n\n"
    6666            text))))))
     67
     68(define (chicken-examples env)
     69  (let-from-environment env (params parse text)
     70    (parse
     71      (html-stream
     72        "Examples:\n\n"
     73        "<enscript highlight=scheme>" text "</enscript>"))))
     74
     75(define (chicken-expr env)
     76  (let-from-environment env (params parse text)
     77    (parse
     78      (html-stream text "\n"))))
     79
     80(define (chicken-result env)
     81  (let-from-environment env (params parse text)
     82    (parse
     83      (html-stream "=> " text "\n"))))
    6784
    6885(define *extensions*
    6986  `((chickenegg (code-break ,chicken-egg-html))
    70     (procedure (code-span ,chicken-procedure))))
     87    (procedure (code-span ,chicken-procedure))
     88    (expr (code-span ,chicken-expr))
     89    (result (code-span ,chicken-result))))
Note: See TracChangeset for help on using the changeset viewer.