private static void removeTailSemicolon(ASTNode newChild, ASTNode parent) {
    ASTNode semi = newChild.getTreeNext();
    while (semi != null && semi.getElementType() == TokenType.WHITE_SPACE && !semi.getText().contains("\n")) {
      semi = semi.getTreeNext();
    }

    if (semi != null && semi.getElementType() == GroovyTokenTypes.mSEMI) {
      parent.removeRange(newChild.getTreeNext(), semi.getTreeNext());
    }
  }
private static void removeTailSemicolon(ASTNode newChild, ASTNode parent)