boolean (@NotNull ASTNode n1, @NotNull LighterASTNode n2) { if (n1 instanceof PsiWhiteSpaceImpl) { return ourAnyLanguageWhitespaceTokens.contains(n2.getTokenType()) || n2 instanceof Token && ((Token)n2).getBuilder().myWhitespaces.contains(n2.getTokenType()); } IElementType n1t; IElementType n2t; if (n1 instanceof ForeignLeafPsiElement) { n1t = ((ForeignLeafPsiElement)n1).getForeignType(); n2t = n2.getTokenType(); } else { n1t = dereferenceToken(n1.getElementType()); n2t = dereferenceToken(n2.getTokenType()); } return Comparing.equal(n1t, n2t); }