Adding support for compound assignment to indented implicit objects.

This commit is contained in:
Jeremy Ashkenas
2010-08-11 23:14:50 -04:00
parent 8c45aa480b
commit fd6e9a1e66
4 changed files with 24 additions and 7 deletions

View File

@@ -118,3 +118,15 @@ num = 10; ok (num ^= 3) is 9
num = 10; ok (num |= 3) is 11
# Compound assignment with implicit objects.
obj = undefined
obj ?=
one: 1
ok obj.one is 1
obj and=
two: 2
ok not obj.one
ok obj.two is 2