From 520d6a9d93199f84b590414df3f7939a6b9c8593 Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Sun, 24 Oct 2010 21:53:48 -0400 Subject: [PATCH] Comments are statements also, not just pure statements. --- documentation/js/block_comment.js | 2 +- index.html | 2 +- lib/nodes.js | 1 + src/nodes.coffee | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/documentation/js/block_comment.js b/documentation/js/block_comment.js index 0dcb62dd..ae602e60 100644 --- a/documentation/js/block_comment.js +++ b/documentation/js/block_comment.js @@ -1,4 +1,4 @@ /* CoffeeScript Compiler v0.9.4 Released under the MIT License -*/; \ No newline at end of file +*/ \ No newline at end of file diff --git a/index.html b/index.html index 4284c27f..191600f8 100644 --- a/index.html +++ b/index.html @@ -1561,7 +1561,7 @@ html = '<
/*
 CoffeeScript Compiler v0.9.4
 Released under the MIT License
-*/;
+*/
 

diff --git a/lib/nodes.js b/lib/nodes.js index 4c19f07a..b676db47 100644 --- a/lib/nodes.js +++ b/lib/nodes.js @@ -454,6 +454,7 @@ })(); __extends(Comment, Base); Comment.prototype.isPureStatement = YES; + Comment.prototype.isStatement = YES; Comment.prototype.makeReturn = THIS; Comment.prototype.compileNode = function(o) { return this.tab + '/*' + multident(this.comment, this.tab) + '*/'; diff --git a/src/nodes.coffee b/src/nodes.coffee index ad6e7b43..c06ccab5 100644 --- a/src/nodes.coffee +++ b/src/nodes.coffee @@ -390,6 +390,7 @@ exports.Value = class Value extends Base exports.Comment = class Comment extends Base isPureStatement: YES + isStatement: YES constructor: (@comment) -> super()