2010-07-10 12:44:30 +00:00
|
|
|
# comment before a ...
|
|
|
|
|
|
|
|
###
|
|
|
|
... block comment.
|
|
|
|
###
|
|
|
|
|
|
|
|
|
2010-01-06 04:15:32 +00:00
|
|
|
# comment
|
2010-01-26 15:52:05 +00:00
|
|
|
func: ->
|
2010-01-06 04:15:32 +00:00
|
|
|
# comment
|
2009-12-31 03:24:40 +00:00
|
|
|
false
|
|
|
|
false # comment
|
|
|
|
false
|
2010-04-22 02:26:45 +00:00
|
|
|
|
2009-12-31 03:24:40 +00:00
|
|
|
# comment
|
|
|
|
true
|
2010-01-06 04:15:32 +00:00
|
|
|
|
2010-01-10 22:36:06 +00:00
|
|
|
switch 'string'
|
|
|
|
# comment
|
|
|
|
when false then something()
|
|
|
|
# comment
|
|
|
|
when null
|
2010-06-12 23:05:13 +00:00
|
|
|
somethingElse()
|
2010-01-10 22:36:06 +00:00
|
|
|
|
2010-01-26 15:52:05 +00:00
|
|
|
->
|
2010-01-21 01:36:31 +00:00
|
|
|
code()
|
|
|
|
# comment
|
|
|
|
|
2010-02-17 00:45:25 +00:00
|
|
|
ok func()
|
2010-02-16 15:12:40 +00:00
|
|
|
|
|
|
|
func
|
|
|
|
func
|
|
|
|
# Line3
|
2010-03-03 00:23:21 +00:00
|
|
|
|
|
|
|
obj: {
|
|
|
|
# comment
|
|
|
|
# comment
|
|
|
|
# comment
|
|
|
|
one: 1
|
|
|
|
# comment
|
|
|
|
two: 2
|
|
|
|
# comment
|
|
|
|
}
|
2010-03-10 21:44:50 +00:00
|
|
|
|
|
|
|
result: if true # comment
|
|
|
|
false
|
|
|
|
|
|
|
|
ok not result
|
|
|
|
|
|
|
|
result: if false
|
|
|
|
false
|
|
|
|
else # comment
|
|
|
|
45
|
|
|
|
|
|
|
|
ok result is 45
|
2010-03-20 04:58:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
test:
|
|
|
|
'test ' +
|
|
|
|
'test ' + # comment
|
|
|
|
'test'
|
|
|
|
|
|
|
|
ok test is 'test test test'
|
2010-05-13 00:56:44 +00:00
|
|
|
|
|
|
|
###
|
|
|
|
This is a here-comment.
|
|
|
|
Kind of like a heredoc.
|
|
|
|
###
|
2010-06-02 04:03:07 +00:00
|
|
|
|
|
|
|
func: ->
|
|
|
|
###
|
|
|
|
Another block comment.
|
|
|
|
###
|
2010-06-12 21:41:46 +00:00
|
|
|
code
|
|
|
|
|
2010-07-07 02:20:42 +00:00
|
|
|
func: ->
|
|
|
|
one: ->
|
|
|
|
two: ->
|
|
|
|
three: ->
|
|
|
|
###
|
|
|
|
block.
|
|
|
|
###
|
|
|
|
four: ->
|
|
|
|
|
|
|
|
fn1: ->
|
|
|
|
oneLevel: null
|
|
|
|
###
|
|
|
|
This isn't fine.
|
|
|
|
###
|
|
|
|
|
|
|
|
ok ok
|
|
|
|
|
2010-07-02 01:26:33 +00:00
|
|
|
obj: {
|
2010-07-02 01:51:28 +00:00
|
|
|
a: 'b'
|
2010-07-02 01:26:33 +00:00
|
|
|
###
|
|
|
|
comment
|
|
|
|
###
|
2010-07-02 01:51:28 +00:00
|
|
|
c: 'd'
|
2010-07-02 01:26:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
arr: [
|
|
|
|
1, 2, 3,
|
|
|
|
###
|
|
|
|
four
|
|
|
|
###
|
|
|
|
5, 6, 7
|
|
|
|
]
|
2010-06-12 21:41:46 +00:00
|
|
|
|
|
|
|
# Spaced comments in if / elses.
|
|
|
|
result: if false
|
|
|
|
1
|
|
|
|
|
|
|
|
# comment
|
|
|
|
else if false
|
|
|
|
2
|
|
|
|
|
|
|
|
# comment
|
|
|
|
else
|
|
|
|
3
|
|
|
|
|
|
|
|
ok result is 3
|
2010-06-12 22:06:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
result: switch 'z'
|
|
|
|
when 'z' then 7
|
|
|
|
# comment
|
|
|
|
ok result is 7
|
2010-06-27 17:02:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Trailing-line comment before an outdent.
|
|
|
|
func: ->
|
|
|
|
if true
|
|
|
|
true # comment
|
|
|
|
7
|
|
|
|
|
|
|
|
ok func() is 7
|
2010-07-15 12:50:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Trailing herecomment in a function.
|
|
|
|
fn: ->
|
|
|
|
code
|
|
|
|
###
|
|
|
|
debug code commented
|
|
|
|
###
|
|
|
|
|
|
|
|
fn2: ->
|