boolean (@Nullable ASTNode node, TokenSet expectedTypes, IElementType... skipTypes) { ASTNode prevNode = node == null ? null : node.getTreePrev(); while (prevNode != null && (isWhitespaceOrEmpty(prevNode) || isOneOf(prevNode, skipTypes))) { prevNode = prevNode.getTreePrev(); } if (prevNode == null) return false; return expectedTypes.contains(prevNode.getElementType()); }