Spacing (Block child1, @NotNull Block child2) { if (child1 == null) { return null; } final ASTNode lnode = ((RncBlock)child1).myNode; final PsiElement lpsi = lnode.getPsi(); final PsiElement rpsi = ((RncBlock)child2).myNode.getPsi(); if (lpsi instanceof RncDecl && rpsi instanceof RncDecl) { return makeNewline(); } if ((lpsi instanceof RncDecl || lpsi instanceof RncDefine || lnode.getElementType() == RncElementTypes.START) && (rpsi instanceof RncDefine || rpsi instanceof RncGrammar)) { return makeNewline(); } return null; }