aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMustafa Quraish <[email protected]>2022-01-28 23:01:17 -0500
committerMustafa Quraish <[email protected]>2022-01-28 23:01:17 -0500
commitf38482a373a1bf3e20c53e5d08f9af9ec16cb1bc (patch)
treefc3929a34b3c45131574c1bbe80320faadd43060 /examples
parentCorrent incorrect `break` in Lexer (diff)
downloadcup-f38482a373a1bf3e20c53e5d08f9af9ec16cb1bc.tar.xz
cup-f38482a373a1bf3e20c53e5d08f9af9ec16cb1bc.zip
Add some arithmetic binary operations into lex+parse+generation
Diffstat (limited to 'examples')
-rw-r--r--examples/binary-ops.cup3
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/binary-ops.cup b/examples/binary-ops.cup
new file mode 100644
index 0000000..13e5083
--- /dev/null
+++ b/examples/binary-ops.cup
@@ -0,0 +1,3 @@
+fn main() {
+ return 2 + 5 * (12 / 4) - 1;
+} \ No newline at end of file