Skip to content

Commit

Permalink
Use skipOptionalWhitespaces() instead of explicit loop
Browse files Browse the repository at this point in the history
  • Loading branch information
catamorphism committed Sep 11, 2024
1 parent bd8e2d8 commit d2edf89
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,7 @@ private MFDataModel.Message parseImpl() throws MFParseException {
// Determine if message is simple or complex; this requires
// looking through whitespace.
int savedPosition = input.getPosition();
while (true) {
int cp = input.peekChar();
if (!StringUtils.isWhitespace(cp)) {
break;
}
// Skip past whitespace
cp = input.readCodePoint();
}
skipOptionalWhitespaces();
int cp = input.peekChar();
if (cp == '.') { // declarations or .match
// No need to restore whitespace
Expand Down

0 comments on commit d2edf89

Please sign in to comment.