summaryrefslogtreecommitdiff
path: root/examples/arithmetics.pipa
diff options
context:
space:
mode:
authorCarlos Maniero <carlosmaniero@gmail.com>2023-04-21 14:36:28 -0300
committerJohnny Richard <johnny@johnnyrichard.com>2023-04-21 19:32:59 +0200
commit39315de738e86e1f1beb52ae14101b5caf7486a2 (patch)
tree8fe675255761e0a5cf8eab283e11d943d20d1f8f /examples/arithmetics.pipa
parent2b870752f767b8fecaf5ceb1dfe4d3366284a690 (diff)
gas: Generate arithmetics expressions
We decided for using push and pop to simplify the implementation, we want to revisit the approach latter. Signed-off-by: Carlos Maniero <carlosmaniero@gmail.com> Co-authored-by: Johnny Richard <johnny@johnnyrichard.com>
Diffstat (limited to 'examples/arithmetics.pipa')
-rw-r--r--examples/arithmetics.pipa3
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/arithmetics.pipa b/examples/arithmetics.pipa
new file mode 100644
index 0000000..e2b7645
--- /dev/null
+++ b/examples/arithmetics.pipa
@@ -0,0 +1,3 @@
+main(): i32 {
+ return ((2 + 1) * (5 - 3) + 7) * 2 / 2;
+}