void () { doTest("a b c", """ Element(ROOT) Element(OTHER) PsiElement(LETTER)('a') PsiErrorElement:error 1 <empty list> PsiWhiteSpace(' ') Element(OTHER) PsiElement(LETTER)('b') PsiErrorElement:error 2 <empty list> PsiWhiteSpace(' ') PsiErrorElement:error 3 PsiElement(LETTER)('c') """, builder -> { PsiBuilder.Marker marker = builder.mark(); builder.advanceLexer(); builder.error("error 1"); marker.done(OTHER); marker = builder.mark(); builder.advanceLexer(); builder.mark().error("error 2"); marker.done(OTHER); marker = builder.mark(); builder.advanceLexer(); marker.error("error 3"); } ); }