ASTNode (@Nullable ASTNode node, @NotNull TokenSet types) { if (node == null) { return null; } for (ASTNode prev = node.getTreePrev(); prev != null; prev = prev.getTreePrev()) { if (!types.contains(prev.getElementType())) { return prev; } } return null; }