void (@NotNull ASTNode child) { if (child.getElementType() == CODE_BLOCK) { final ASTNode prevWS = TreeUtil.prevLeaf(child); if (prevWS != null && prevWS.getElementType() == TokenType.WHITE_SPACE) { removeChild(prevWS); } super.deleteChildInternal(child); final CharTable treeCharTab = SharedImplUtil.findCharTableByTree(this); LeafElement semicolon = Factory.createSingleLeafElement(SEMICOLON, ";", 0, 1, treeCharTab, getManager()); addInternal(semicolon, semicolon, null, Boolean.TRUE); } else if (child.getElementType() == PARAMETER_LIST) { throw new IllegalArgumentException("Deleting parameter list is prohibited"); } else { super.deleteChildInternal(child); } }