moving along with whitespace

This commit is contained in:
Jeremy Ashkenas
2009-12-28 23:08:02 -05:00
parent ddd52a1845
commit cea417de02
9 changed files with 91 additions and 107 deletions

View File

@@ -3,6 +3,6 @@ results: n * 2 for n in nums.
# next: for n in [1, 2, 3] if n % 2 isnt 0
# print('hi') if false
# n * n * 2.
# n * n * 2
print(results.join(',') is '2,18')

View File

@@ -1,6 +1,6 @@
result: try
nonexistent * missing
catch error
true.
true
print(result)

View File

@@ -1,21 +1,21 @@
Base: => .
Base: =>
Base.prototype.func: string =>
'zero/' + string.
'zero/' + string
FirstChild: => .
FirstChild: =>
FirstChild extends Base
FirstChild.prototype.func: string =>
super('one/') + string.
super('one/') + string
SecondChild: => .
SecondChild: =>
SecondChild extends FirstChild
SecondChild.prototype.func: string =>
super('two/') + string.
super('two/') + string
ThirdChild: => .
ThirdChild: =>
ThirdChild extends SecondChild
ThirdChild.prototype.func: string =>
super('three/') + string.
super('three/') + string
result: (new ThirdChild()).func('four')

View File

@@ -1,4 +1,4 @@
identity_wrap: x => => x..
identity_wrap: x => => x
result: identity_wrap(identity_wrap(true))()()

View File

@@ -3,7 +3,7 @@ func: =>
b: []
while a >= 0
b.push('o')
a--.
a--
c: {
"text": b
@@ -14,14 +14,14 @@ func: =>
c.text: if false
'error'
else
c.text + '---'.
c.text + '---'
d = {
text = c.text
}
c.list: l for l in d.text.split('') if l is '-'.
c.list: l for l in d.text.split('') if l is '-'
c.single: c.list[1..1][0].
c.single: c.list[1..1][0]
print(func() == '-')

View File

@@ -3,9 +3,8 @@ c: false
result: if a
if b
if c then false
else
if c then false else
if d
true....
true
print(result)

View File

@@ -1,6 +1,6 @@
six: \
1 + \
2 + \
3
1 + \
2 + \
3
print(six is 6)

View File

@@ -1,11 +1,13 @@
num: 10
result: switch num
when 5 then false
when 'a'
false
when 10 then true
when 11 then false
else false.
when 5 then false
when 'a'
true
true
false
when 10 then true
when 11 then false
else false
print(result)