void (PsiBuilder builder) { final PsiBuilder.Marker marker = builder.mark(); while (!parseAtom(builder)) { final IElementType token = builder.getTokenType(); if (token == RegExpTT.GROUP_END || token == RegExpTT.UNION || token == null) { // empty branches are allowed marker.done(RegExpElementTypes.BRANCH); return; } patternExpected(builder); } //noinspection StatementWithEmptyBody while (parseAtom(builder)) {} marker.done(RegExpElementTypes.BRANCH); }