File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -28,10 +28,8 @@ namespace query {
2828// is found before End, return StringRef(). Begin is adjusted to exclude the
2929// lexed region.
3030StringRef QueryParser::lexWord () {
31- Line = Line.drop_while ([](char c) {
32- // Don't trim newlines.
33- return StringRef (" \t\v\f\r " ).contains (c);
34- });
31+ // Don't trim newlines.
32+ Line = Line.ltrim (" \t\v\f\r " );
3533
3634 if (Line.empty ())
3735 // Even though the Line is empty, it contains a pointer and
@@ -152,8 +150,7 @@ QueryRef QueryParser::parseSetTraversalKind(TraversalKind QuerySession::*Var) {
152150
153151QueryRef QueryParser::endQuery (QueryRef Q) {
154152 StringRef Extra = Line;
155- StringRef ExtraTrimmed = Extra.drop_while (
156- [](char c) { return StringRef (" \t\v\f\r " ).contains (c); });
153+ StringRef ExtraTrimmed = Extra.ltrim (" \t\v\f\r " );
157154
158155 if ((!ExtraTrimmed.empty () && ExtraTrimmed[0 ] == ' \n ' ) ||
159156 (ExtraTrimmed.size () >= 2 && ExtraTrimmed[0 ] == ' \r ' &&
You can’t perform that action at this time.
0 commit comments