initial commit of the mystery language

This commit is contained in:
Jeremy Ashkenas
2009-12-13 17:07:16 -05:00
commit 8e9d637985
10 changed files with 2339 additions and 0 deletions

40
code.jaa Normal file
View File

@@ -0,0 +1,40 @@
# I'm a comment and I'm ok.
# Return
# Case
square: x => x * x.
sum: x, y => x + y.
odd: x => x % 2 is 0.
even: x => x % 2 aint 0.
object_literal: {one: 1, two: 2, three: 3}
multiline_object: {
pi: 3.14159
list: [1, 2, 3, 4]
three: 3
inner_obj: {
freedom: => _.freedom().
}
}
run_loop: =>
fire_events(e => e.stopPropagation().)
listen()
wait().
if submarine.shields_up
full_speed_ahead()
weapons.fire_torpedos()
else
run_away().
eldest: if 25 > 21 then liz else marge.