Comments are statements also, not just pure statements.

This commit is contained in:
Jeremy Ashkenas 2010-10-24 21:53:48 -04:00
parent 00220a9f2c
commit 520d6a9d93
4 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/*
CoffeeScript Compiler v0.9.4
Released under the MIT License
*/;
*/

View File

@ -1561,7 +1561,7 @@ html <span class="Keyword">=</span> <span class="String"><span class="String">'<
</pre><pre class="idle"><span class="Comment"><span class="Comment">/*</span></span>
<span class="Comment">CoffeeScript Compiler v0.9.4</span>
<span class="Comment">Released under the MIT License</span>
<span class="Comment"><span class="Comment">*/</span></span>;
<span class="Comment"><span class="Comment">*/</span></span>
</pre><br class='clear' /></div>
<h2>

View File

@ -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) + '*/';

View File

@ -390,6 +390,7 @@ exports.Value = class Value extends Base
exports.Comment = class Comment extends Base
isPureStatement: YES
isStatement: YES
constructor: (@comment) -> super()