Skip to content

Commit 6790592

Browse files
committed
outline
1 parent c22febe commit 6790592

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/com/shapesecurity/shift/es2017/parser/PatternAcceptor.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,10 @@ public String collect(@Nonnull String[]... stringArrays) {
162162

163163
public String collect(Maybe<Integer> limit, @Nonnull String[]... stringArrays) {
164164
StringBuilder stringBuilder = new StringBuilder();
165-
165+
boolean isJust = limit.isJust();
166+
int justLimit = limit.fromJust();
166167
outer:
167-
for (int i = 0; limit.isNothing() || limit.fromJust() > i; ++i) {
168+
for (int i = 0; !isJust || justLimit > i; ++i) {
168169
for (String[] strings : stringArrays) {
169170
for (String string : strings) {
170171
if (this.eat(string)) {

0 commit comments

Comments
 (0)