def title = "Programming language authors";
def authors = ["Anders Hejlsberg", "Simon Peyton-Jones"];
// 'xml' - macro from Nemerle.Xml.Macro library which alows to inline XML literals into the nemerle-code
def html = xml <#
<html>
<head>
<title>$title</title>
</head>
<body>
<ul $when(authors.Any())>
<li $foreach(author in authors)>$author</li>
</ul>
</body>
</html>
#>
Trace.Assert(html.GetType().Equals(typeof(XElement)));
WriteLine(html.GetType());
ZGVmIHRpdGxlID0gIlByb2dyYW1taW5nIGxhbmd1YWdlIGF1dGhvcnMiOwpkZWYgYXV0aG9ycyA9IFsiQW5kZXJzIEhlamxzYmVyZyIsICJTaW1vbiBQZXl0b24tSm9uZXMiXTsKICAgIAovLyAneG1sJyAtIG1hY3JvIGZyb20gTmVtZXJsZS5YbWwuTWFjcm8gbGlicmFyeSB3aGljaCBhbG93cyB0byBpbmxpbmUgWE1MIGxpdGVyYWxzIGludG8gdGhlIG5lbWVybGUtY29kZQpkZWYgaHRtbCA9IHhtbCA8IwogIDxodG1sPgogICAgPGhlYWQ+CiAgICAgIDx0aXRsZT4kdGl0bGU8L3RpdGxlPgogICAgPC9oZWFkPgogICAgPGJvZHk+CiAgICAgIDx1bCAkd2hlbihhdXRob3JzLkFueSgpKT4KICAgICAgICA8bGkgJGZvcmVhY2goYXV0aG9yIGluIGF1dGhvcnMpPiRhdXRob3I8L2xpPgogICAgICA8L3VsPgogICAgPC9ib2R5PgogIDwvaHRtbD4KIz4KVHJhY2UuQXNzZXJ0KGh0bWwuR2V0VHlwZSgpLkVxdWFscyh0eXBlb2YoWEVsZW1lbnQpKSk7CldyaXRlTGluZShodG1sLkdldFR5cGUoKSk7
prog.nem:16:3:16:3: error: unsupported preprocessing directive `>' at Nemerle.Compiler.LexerBase.parse_preprocessor () [0x00000]
at Nemerle.Compiler.LexerBase.eat_whitespace () [0x00000]
at Nemerle.Compiler.LexerFile.GetToken () [0x00000]
at Nemerle.Compiler.PreParser.get_token () [0x00000]
prog.nem:6:3:6:4: error: parse error near operator `<': expecting expression
prog.nem:6:4:6:8: error: expected `;'
prog.nem:6:4:6:8: error: parse error near identifier `html': unexpected token after expression in sequence