Skip to content

Commit 90f262c

Browse files
committed
better javadoc for unsafeZeroWidthParser
1 parent e026a63 commit 90f262c

File tree

1 file changed

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

1 file changed

+3
-4
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1265,13 +1265,12 @@ T computeDefaultValue() {
12651265
}
12661266

12671267
/**
1268-
* Temporarily creates a zero-width success parser. It's not safe to be used in a loop and must
1269-
* be carefully attached with parser that consumes!
1268+
* Temporarily creates a zero-width success parser. It's a crippled parser, not safe to be used
1269+
* in a loop and must be carefully composed with a parser that does consume!
12701270
*/
12711271
private Parser<T> asUnsafeZeroWidthParser() {
12721272
return new Parser<T>() {
1273-
@Override
1274-
MatchResult<T> skipAndMatch(
1273+
@Override MatchResult<T> skipAndMatch(
12751274
Parser<?> skip, CharInput input, int start, ErrorContext context) {
12761275
return switch (notEmpty().skipAndMatch(skip, input, start, context)) {
12771276
case MatchResult.Success<T> success -> success;

0 commit comments

Comments
 (0)