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

88 lines
824 B
CoffeeScript

# comment
func: ->
# comment
false
false # comment
false
# comment
true
switch 'string'
# comment
when false then something()
# comment
when null
somethingElse()
->
code()
# comment
ok func()
func
func
# Line3
obj: {
# comment
# comment
# comment
one: 1
# comment
two: 2
# comment
}
result: if true # comment
false
ok not result
result: if false
false
else # comment
45
ok result is 45
test:
'test ' +
'test ' + # comment
'test'
ok test is 'test test test'
###
This is a here-comment.
Kind of like a heredoc.
###
func: ->
###
Another block comment.
###
code
# Spaced comments in if / elses.
result: if false
1
# comment
else if false
2
# comment
else
3
ok result is 3
result: switch 'z'
when 'z' then 7
# comment
ok result is 7