ASTNode (@NotNull IElementType root, PsiBuilder builder) { final PsiBuilder.Marker fileMarker = builder.mark(); final PsiBuilder.Marker docMarker = builder.mark(); new PatternParsing(builder).parse(); while (!builder.eof()) { builder.error(XmlPsiBundle.message("xml.parsing.unexpected.token")); builder.advanceLexer(); } docMarker.done(RncElementTypes.DOCUMENT); fileMarker.done(root); return builder.getTreeBuilt(); }