parser: remove generated old-style accesors.
[nit.git] / lib / template.nit
index 9608f49..f8916b3 100644 (file)
@@ -67,18 +67,20 @@ module template
 #
 #     class LnkTmpl
 #         super Template
-#         var text: Template
+#         var text: Streamable
 #         var title: nullable String
 #         var href: String
 #         redef fun rendering do
-#             add """<a href="{{{href.html_escape}}}" """
-#             if title != null then add """title="{{{title.html_escape}}}" """
+#             add """<a href="{{{href.html_escape}}}""""
+#             if title != null then add """ title="{{{title.html_escape}}}""""
 #             add ">"
 #             add text
 #             add "</a>"
 #         end
 #         # ...
 #     end
+#     var l = new LnkTmpl("hello world", null, "hello.png")
+#     assert l.write_to_string == """<a href="hello.png">hello world</a>"""
 #
 class Template
        super Streamable