Input: Type Supertype (ParamType paramName)*
Generates:
- The class with
- header:
"TODO document" shared class $Type($paramName, ...) extends $SuperType(TODO args) { shared actual Result transform<out Result>(Transformer<Result> transformer) => transformer.transform$Type(this);
equals
– gets finicky for optional types, we might want to let eclipse generate this? On second thought, no. I’m currently not letting eclipse do that because I’m hesitant which attributes it will use. It shouldn’t be too hard to get this right.hash
– watch out for optional params!copy
- header:
- Additional line in
Transformer
,WideningTransformer
(use$SuperType
),Editor
(=> copy(transform$ParamType($paramName), ...)
– don’t care that it’s not always correct),Visitor
(+visit
)- keep alphabetical sorting
- Additional method in
CeylonExpressionTransformer
– generate=> "$Type(``transformWithIndent(that.$paramName)``, ...)";
, don’t care that it’s not always correct - Additional import
J$Type=$Type
and method toRedHatTransformer
- New file
$Type.ceylon
in backend, with imports,$TypeToCeylon(J$Type)
andcompile$Type
(probably empty) - New file
$Type.ceylon
in test-backend, with imports and conversion and compilation test (no samples)
We could also read documentation on stdin (until Ctrl+D). Can be detected because process.readLine() returns String?.
Everything that adds a new file (class, backend conversion, backend tests) is done. Modifying existing files is trickier.