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 {
28
28
// is found before End, return StringRef(). Begin is adjusted to exclude the
29
29
// lexed region.
30
30
StringRef 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 " );
35
33
36
34
if (Line.empty ())
37
35
// Even though the Line is empty, it contains a pointer and
@@ -152,8 +150,7 @@ QueryRef QueryParser::parseSetTraversalKind(TraversalKind QuerySession::*Var) {
152
150
153
151
QueryRef QueryParser::endQuery (QueryRef Q) {
154
152
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 " );
157
154
158
155
if ((!ExtraTrimmed.empty () && ExtraTrimmed[0 ] == ' \n ' ) ||
159
156
(ExtraTrimmed.size () >= 2 && ExtraTrimmed[0 ] == ' \r ' &&
You can’t perform that action at this time.
0 commit comments