aboutsummaryrefslogtreecommitdiff
path: root/prog/function.doml
diff options
context:
space:
mode:
authorBen Burwell <ben.burwell@trifecta.com>2016-09-14 16:15:20 -0400
committerBen Burwell <ben.burwell@trifecta.com>2016-09-14 16:15:20 -0400
commitf704918fe2b187d715fe985ebffebdfbdc4b541f (patch)
tree9fc63b49b81ded84624bc6b1679015baffd7d292 /prog/function.doml
parent2c1eee7b2a99985bbe92426368ea32360a4cc0b2 (diff)
Add repeat and input
Diffstat (limited to 'prog/function.doml')
-rw-r--r--prog/function.doml19
1 files changed, 19 insertions, 0 deletions
diff --git a/prog/function.doml b/prog/function.doml
new file mode 100644
index 0000000..841cb0b
--- /dev/null
+++ b/prog/function.doml
@@ -0,0 +1,19 @@
+statement-sequence {
+ assign(name=myFunc) {
+ function(args=stringToPrint,val1,val2) {
+ print {
+ variable(name=stringToPrint)
+ bin-op(op=+) {
+ variable(name=val1)
+ variable(name=val2)
+ }
+ }
+ }
+ }
+
+ call(name=myFunc) {
+ constant(val="hello, world!" type="string")
+ constant(val="3.5" type="number")
+ constant(val="7" type="number")
+ }
+}