fork download
  1. def title = "Programming language authors";
  2. def authors = ["Anders Hejlsberg", "Simon Peyton-Jones"];
  3.  
  4. // 'xml' - macro from Nemerle.Xml.Macro library which alows to inline XML literals into the nemerle-code
  5. def html = xml <#
  6. <html>
  7. <head>
  8. <title>$title</title>
  9. </head>
  10. <body>
  11. <ul $when(authors.Any())>
  12. <li $foreach(author in authors)>$author</li>
  13. </ul>
  14. </body>
  15. </html>
  16. #>
  17. Trace.Assert(html.GetType().Equals(typeof(XElement)));
  18. WriteLine(html.GetType());
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
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
stdout
Standard output is empty