Print dangling on ast on all the paths

master
Christopher Chedeau 2017-02-04 18:53:13 -08:00
parent 7abd6f5f9b
commit b42e865c61
1 changed files with 4 additions and 4 deletions

View File

@ -168,8 +168,8 @@ function attach(comments, ast, text) {
} else if (enclosingNode) {
addDanglingComment(enclosingNode, comment);
} else {
// TODO: If there are no nodes at all, we should still somehow
// print the comment.
// There are no nodes, let's attach it to the root of the ast
addDanglingComment(ast, comment);
}
} else {
// Otherwise, text exists both before and after the comment on
@ -193,8 +193,8 @@ function attach(comments, ast, text) {
} else if (enclosingNode) {
addDanglingComment(enclosingNode, comment);
} else {
// TODO: If there are no nodes at all, we should still somehow
// print the comment.
// There are no nodes, let's attach it to the root of the ast
addDanglingComment(ast, comment);
}
}
});