Skip to content

Commit eb5da83

Browse files
committed
sequence() delegate to asUnsafeZeroWidthParser()
1 parent 70dc9e6 commit eb5da83

File tree

1 file changed

+1
-3
lines changed
  • dot-parse/src/main/java/com/google/common/labs/parse

1 file changed

+1
-3
lines changed

dot-parse/src/main/java/com/google/common/labs/parse/Parser.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,7 @@ static <A, B, C> Parser<C> sequence(
315315
Parser<A>.OrEmpty left,
316316
Parser<B> right,
317317
BiFunction<? super A, ? super B, ? extends C> combiner) {
318-
return anyOf(
319-
sequence(left.notEmpty(), right, combiner),
320-
right.map(v2 -> combiner.apply(left.computeDefaultValue(), v2)));
318+
return sequence(left.asUnsafeZeroWidthParser(), right, combiner);
321319
}
322320

323321
/** Matches if any of the given {@code parsers} match. */

0 commit comments

Comments
 (0)