summaryrefslogtreecommitdiff
path: root/ddl/templates/data.java.ede
diff options
context:
space:
mode:
authorCsaba Hruska <csaba.hruska@gmail.com>2015-12-21 13:48:22 +0100
committerCsaba Hruska <csaba.hruska@gmail.com>2015-12-21 13:48:22 +0100
commitbefc5afb22b36d744c403d103d591c5d190d394f (patch)
tree05e390bef55b0662a9a919b886322b66b113ff21 /ddl/templates/data.java.ede
parentdc8e31235fccbe5ea54d94b0ca69e005ca88c7ea (diff)
add lambdacube-ir haskell lib
Diffstat (limited to 'ddl/templates/data.java.ede')
-rw-r--r--ddl/templates/data.java.ede26
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 %}
5import {{ m.value }};
6{% endfor %}
7
8public 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