| 3 | | * Add support for commenting full blocks of lines using /# and #/. Block comments can be nested. |
| 4 | | '/#' block comment start and '#/' block comment end as initial chars on line |
| | 3 | * Added new comment markers /# ... #/ which can be used for block comments and inline comments. Block comments must start at the beginning of a line and can be used to comment out multiple lines of source. They can be nested. Inline comments also start with /# and end with #/, but within the same line. They can be used to comment out a portion of a line. Regular end of line comments are still available and still the norm. |
| | 4 | .code |
| | 5 | class Example |
| | 6 | |
| | 7 | def main is shared |
| | 8 | # an end-of-line comment |
| | 9 | t = [1, 2, 3] # a list of numbers |
| | 10 | |
| | 11 | # an inline comment |
| | 12 | print t, /#t[0],#/ t.count |
| | 13 | |
| | 14 | # a block comment |
| | 15 | /# |
| | 16 | def foo |
| | 17 | print 'bar' |
| | 18 | #/ |