void () { doTest("ab", """ Element(ROOT) Element(COLLAPSED) PsiElement(LETTER)('a') Element(COLLAPSED) <empty list> PsiErrorElement:with error <empty list> Element(OTHER) PsiElement(LETTER)('b') """, builder -> { PsiBuilder.Marker marker1 = builder.mark(); builder.advanceLexer(); PsiBuilder.Marker marker2 = builder.mark(); builder.advanceLexer(); marker2.done(OTHER); marker2.precede().doneBefore(COLLAPSED, marker2); marker1.doneBefore(COLLAPSED, marker2, "with error"); } ); }