summaryrefslogtreecommitdiff
path: root/examples/02-sum/src/shapes.hob
diff options
context:
space:
mode:
Diffstat (limited to 'examples/02-sum/src/shapes.hob')
-rw-r--r--examples/02-sum/src/shapes.hob14
1 files changed, 14 insertions, 0 deletions
diff --git a/examples/02-sum/src/shapes.hob b/examples/02-sum/src/shapes.hob
new file mode 100644
index 0000000..08336c5
--- /dev/null
+++ b/examples/02-sum/src/shapes.hob
@@ -0,0 +1,14 @@
+sum Shape {
+ variant Rectangle;
+ variant Triangle;
+}
+
+struct Rectangle {
+ field width: Int32;
+ field height: Int32;
+}
+
+struct Triangle {
+ field width: Int32;
+ field height: Int32;
+}