boolean (PsiBuilder builder) { PsiBuilder.Marker expr = builder.mark(); if (!parseCastableExpr(builder)) { expr.drop(); return false; } if (builder.getTokenType() == XPath2TokenTypes.TREAT) { builder.advanceLexer(); checkMatches(builder, XPath2TokenTypes.AS, XPathBundle.message("parsing.error.as.expected")); if (!parseSequenceType(builder)) { builder.error(XPathBundle.message("parsing.error.sequence.type.expected")); } expr.done(XPath2ElementTypes.TREAT_AS); } else { expr.drop(); } return true; }