mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-19 03:44:23 -05:00
Adding initial implementation of here-comments (block comments) Issue #368
This commit is contained in:
@@ -358,15 +358,20 @@ children ValueNode, 'base', 'properties'
|
||||
# same position.
|
||||
exports.CommentNode: class CommentNode extends BaseNode
|
||||
|
||||
constructor: (lines) ->
|
||||
constructor: (lines, type) ->
|
||||
@lines: lines
|
||||
@type: type
|
||||
this
|
||||
|
||||
make_return: ->
|
||||
this
|
||||
|
||||
compile_node: (o) ->
|
||||
"$@tab//" + @lines.join("\n$@tab//")
|
||||
if @type is 'herecomment'
|
||||
sep: '\n' + @idt(1)
|
||||
"$@tab/*$sep${ @lines.join(sep) }\n$@tab*/"
|
||||
else
|
||||
"$@tab//" + @lines.join("\n$@tab//")
|
||||
|
||||
statement CommentNode
|
||||
|
||||
|
||||
Reference in New Issue
Block a user