boolean (ASTNode node) { List<ASTNode> nodes = StreamEx.iterate(node, Objects::nonNull, n -> n.getTreePrev()).skip(1) .filter(n -> !YAMLElementTypes.SPACE_ELEMENTS.contains(n.getElementType())) .takeWhile(n -> !YAMLTokenTypes.EOL.equals(n.getElementType())).limit(2).toList(); if (nodes.size() != 1) return false; return YAMLTokenTypes.SEQUENCE_MARKER.equals(nodes.get(0).getElementType()); }