summary refs log tree commit diff stats
path: root/examples/talk/dsl.nim
diff options
context:
space:
mode:
Diffstat (limited to 'examples/talk/dsl.nim')
-rw-r--r--examples/talk/dsl.nim33
1 files changed, 0 insertions, 33 deletions
diff --git a/examples/talk/dsl.nim b/examples/talk/dsl.nim
deleted file mode 100644
index 2dde51790..000000000
--- a/examples/talk/dsl.nim
+++ /dev/null
@@ -1,33 +0,0 @@
-
-import strutils
-
-template html(name, matter: untyped) =
-  proc name(): string =
-    result = "<html>"
-    matter
-    result.add("</html>")
-
-template nestedTag(tag: untyped) =
-  template tag(matter: typed) =
-    result.add("<" & astToStr(tag) & ">")
-    matter
-    result.add("</" & astToStr(tag) & ">")
-
-template simpleTag(tag: untyped) =
-  template tag(matter: untyped) =
-    result.add("<$1>$2</$1>" % [astToStr(tag), matter])
-
-nestedTag body
-nestedTag head
-nestedTag ul
-simpleTag title
-simpleTag li
-
-html mainPage:
-  head:
-    title "now look at this"
-  body:
-    ul:
-      li "Nim is quite capable"
-
-echo mainPage()