Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
jevanlingen committed Dec 11, 2024
1 parent addfd85 commit 422df9e
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2189,12 +2189,8 @@ private String getKeyword(String variableName) {
} else {
throw new IllegalStateException("Ran into unknown or unimplemented identifier at " + leftover.substring(0, 10));
}
int saveCursor = cursor;
Space space = whitespace();
if (source.substring(cursor).startsWith(variableName)) {
cursor = saveCursor;
} else {
retVal += space.getWhitespace();
if (!source.substring(indexOfNextNonWhitespace(cursor, source)).startsWith(variableName)) {
retVal += whitespace().getWhitespace();
retVal += getKeyword(variableName);
}
return retVal;
Expand Down

0 comments on commit 422df9e

Please sign in to comment.