Skip to content

Commit

Permalink
Fixed comments following simple expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
comp615 committed Nov 7, 2012
1 parent 216e383 commit 00fab71
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions escodegen.js
Expand Up @@ -701,6 +701,7 @@
if (stmt.trailingComments) {
tailingToStatement = !endsWithLineTerminator(toSourceNode(result).toString());
specialBase = stringRepeat(' ', calculateSpaces(toSourceNode([base, result, indent]).toString()));
result = isArray(result) ? result : [result];
for (i = 0, len = stmt.trailingComments.length; i < len; i += 1) {
comment = stmt.trailingComments[i];
if (tailingToStatement) {
Expand Down
1 change: 1 addition & 0 deletions test/comment/simple-statement-comment.expected.js
@@ -0,0 +1 @@
; // Trailing
1 change: 1 addition & 0 deletions test/comment/simple-statement-comment.js
@@ -0,0 +1 @@
; // Trailing

0 comments on commit 00fab71

Please sign in to comment.