Do not attach comments to EmptyStatement (#599)
Since we don't print EmptyStatement, we don't want to attach comments to them. I've tried actually printing the EmptyStatement but it messes up a ton of other things.master
parent
77bf64c6b1
commit
c07329b4ef
|
@ -28,7 +28,7 @@ function getSortedChildNodes(node, text, resultArray) {
|
||||||
util.fixFaultyLocations(node, text);
|
util.fixFaultyLocations(node, text);
|
||||||
|
|
||||||
if (resultArray) {
|
if (resultArray) {
|
||||||
if (n.Node.check(node)) {
|
if (n.Node.check(node) && node.type !== "EmptyStatement") {
|
||||||
// This reverse insertion sort almost always takes constant
|
// This reverse insertion sort almost always takes constant
|
||||||
// time because we almost always (maybe always?) append the
|
// time because we almost always (maybe always?) append the
|
||||||
// nodes in order anyway.
|
// nodes in order anyway.
|
||||||
|
|
|
@ -416,13 +416,13 @@ function var_var() {
|
||||||
|
|
||||||
function function_toplevel() {
|
function function_toplevel() {
|
||||||
function a() {}
|
function a() {}
|
||||||
function a() {}
|
function a() {} // OK
|
||||||
}
|
}
|
||||||
|
|
||||||
function function_block() {
|
function function_block() {
|
||||||
{
|
{
|
||||||
function a() {}
|
function a() {}
|
||||||
function a() {}
|
function a() {} // error: name already bound
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue