Fix leading comment inside returned SequenceExpression (#1133)

This commit is contained in:
Alex Rattray authored and Christopher Chedeau committed 2017-04-05 13:41:35 -07:00
1 parent bab9b5b93a
commit d0666c3da4
3 files changed
+19 -1

No files matched your search

-1
View File
@@ -3255,7 +3255,6 @@ function hasLeadingOwnLineComment(text, node) {
node.comments.some(
comment =>
comment.leading &&
util.hasNewline(text, util.locStart(comment), { backwards: true }) &&
util.hasNewline(text, util.locEnd(comment))
);
return res;
@@ -839,6 +839,12 @@ function sequenceExpression() {
), b
}
function sequenceExpressionInside() {
return ( // Reason for a
a, b
);
}
function taggedTemplate() {
return (
// Reason for a
@@ -963,6 +969,13 @@ function sequenceExpression() {
);
}
function sequenceExpressionInside() {
return (
// Reason for a
a, b
);
}
function taggedTemplate() {
return (
// Reason for a
+6
View File
@@ -100,6 +100,12 @@ function sequenceExpression() {
), b
}
function sequenceExpressionInside() {
return ( // Reason for a
a, b
);
}
function taggedTemplate() {
return (
// Reason for a