diff options
author | Csaba Hruska <csaba.hruska@gmail.com> | 2015-12-21 13:48:22 +0100 |
---|---|---|
committer | Csaba Hruska <csaba.hruska@gmail.com> | 2015-12-21 13:48:22 +0100 |
commit | befc5afb22b36d744c403d103d591c5d190d394f (patch) | |
tree | 05e390bef55b0662a9a919b886322b66b113ff21 /ddl/templates/data.java.ede | |
parent | dc8e31235fccbe5ea54d94b0ca69e005ca88c7ea (diff) |
add lambdacube-ir haskell lib
Diffstat (limited to 'ddl/templates/data.java.ede')
-rw-r--r-- | ddl/templates/data.java.ede | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/ddl/templates/data.java.ede b/ddl/templates/data.java.ede new file mode 100644 index 0000000..c85a521 --- /dev/null +++ b/ddl/templates/data.java.ede | |||
@@ -0,0 +1,26 @@ | |||
1 | // generated file, do not modify! | ||
2 | // {{ dateTime }} | ||
3 | |||
4 | {% for m in imports %} | ||
5 | import {{ m.value }}; | ||
6 | {% endfor %} | ||
7 | |||
8 | public class {{ moduleName }} { | ||
9 | {% for t in dataAndType %} | ||
10 | {% case t.value | constType %} | ||
11 | {% when "DataDef" %} | ||
12 | public class {{ t.value.dataName }} { | ||
13 | public enum Tag { {% for c in t.value.constructors %} | ||
14 | {{ c.value.name }}{% if !c.last %},{% endif %}{% endfor %} | ||
15 | } | ||
16 | public Tag tag; | ||
17 | {% for c in t.value.constructors %}{% if !(c.value.fields | empty) %} | ||
18 | public class {{ c.value.name }}_ extends {{ t.value.dataName }} { {% for f in c.value.fields %}{% if c.value.fields | hasFieldNames %} | ||
19 | public {{ f.value.fieldType | javaType }} {{ f.value.fieldName }};{% else %} | ||
20 | public {{ f.value.fieldType | javaType }} _{{ f.index0 }};{% endif %}{% endfor %} | ||
21 | }{% endif %}{% endfor %} | ||
22 | } | ||
23 | |||
24 | {% endcase %} | ||
25 | {% endfor %} | ||
26 | } \ No newline at end of file | ||