Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yorickpeterse/0e72898c5f7727de2303747ae62383bc to your computer and use it in GitHub Desktop.
Save yorickpeterse/0e72898c5f7727de2303747ae62383bc to your computer and use it in GitHub Desktop.
eon $ cat -n /tmp/test.aeon
1 def add(Integer left, Integer right) -> Integer:
2 return __integer_add(left, right)
3
4 def print(String message) -> Integer:
5 return __stdout_write(message)
6
7 def int_to_string(Integer int) -> String:
8 return __integer_to_string(int)
9
10 let a = 10
11 let b = 20
12 let sum = add(a, b)
13
14 print(int_to_string(sum))
15 print("\n")
16
17 # vim: set ft=aeon sts=2 sw=2 ts=2:
aeon $ ruby bootstrap/bin/compile /tmp/test.aeon
aeon $ cargo run -- /tmp/test.aeonc
Running `target/debug/aeonvm /tmp/test.aeonc`
30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment