in lib/common_generator.js [334:352]
visitStmts(ast, isAsync, level) {
assert.equal(ast.type, 'stmts');
let node;
for (var i = 0; i < ast.stmts.length; i++) {
node = ast.stmts[i];
this.visitStmt(node, isAsync, level);
}
if (node) {
//find the last node's back comment
let comments = DSL.comment.getBackComments(this.ctx.comments, node.tokenRange[1]);
this.visitComments(comments, level);
}
if (ast.stmts.length === 0) {
//empty block's comment
let comments = DSL.comment.getBetweenComments(this.ctx.comments, ast.tokenRange[0], ast.tokenRange[1]);
this.visitComments(comments, level);
}
}