Ket templates should be compiled to generate a Kermeta file. Right click on your KET
file and select Kermeta -> Translate Kermeta Template.
You get a new .kmt file with the same name of your KET template. The .kmt file contains a Kermeta
class that conforms to the parameters you provide. This Kermeta class provides also a
generate(...)
operation you would execute to pretty-print the text you expect.
<%@ket package="hello_world" require="" using="" class="Hello_World" parameters="" %%> <%-- Pretty printer code --%> Hello World !! | package hello_world; require kermeta using kermeta::standard using kermeta::utils class Hello_World{ operation generate():String is do var _res: StringBuffer init StringBuffer.new // Pretty printer code _res.append("Hello World !!") result := _res.toString end } |