Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactored markup macros, added basic Atom definitions.
- Loading branch information
Tim Burks
committed
Oct 9, 2010
1 parent
7ca2c0c
commit f4eb828
Showing
4 changed files
with
37 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
(load "NuMarkup:macros") | ||
|
||
(set &feed (NuMarkupOperator operatorWithTag:"feed" prefix:<<-END | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
END)) | ||
|
||
# add tags as needed | ||
(markup title | ||
subtitle | ||
id | ||
generator | ||
link | ||
updated | ||
entry | ||
author | ||
published | ||
content | ||
name) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
;; | ||
;; macro to define markup operators | ||
;; see xhtml.nu, rss.nu, etc. for examples | ||
;; | ||
(macro markup (*names) | ||
`(progn | ||
(',*names each: | ||
(do (name) | ||
(set stringName (name stringValue)) | ||
(set expression | ||
(list 'global | ||
((+ "&" stringName) symbolValue) | ||
'(NuMarkupOperator operatorWithTag:stringName))) | ||
(eval expression))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters