1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00

Tests to ensure reserver words and operators can be used as object keys

This commit is contained in:
Stan Angeloff 2010-05-23 12:44:40 +03:00
parent c200b95f6a
commit 5a306785ba

View file

@ -7,6 +7,16 @@ js: CoffeeScript.compile("one\r\ntwo", {no_wrap: on})
ok js is "one;\ntwo;"
# Reserved words can be used as object properties
obj: {
is: -> 1
of: 'many'
}
ok obj.is() is 1
ok obj.of is 'many'
# Try out language extensions to CoffeeScript.
# Create the Node were going to add -- a literal syntax for splitting