Minor refactoring in IndentationParser

This commit is contained in:
Oleg Sukhodolsky
2012-07-13 12:19:03 +04:00
parent 1506a615d2
commit 118bb58fb3
@@ -77,12 +77,10 @@ public abstract class IndentationParser implements PsiParser {
if (!stack.isEmpty()) {
final Pair<Integer, PsiBuilder.Marker> pair = stack.peek();
if (currentIndent == pair.first) {
stack.pop().second.done(myBlockElementType);
passEOLsAndIndents(builder);
stack.push(Pair.create(currentIndent, builder.mark()));
}
if (currentIndent > pair.first) {
if (currentIndent >= pair.first) {
if (currentIndent == pair.first) {
stack.pop().second.done(myBlockElementType);
}
passEOLsAndIndents(builder);
stack.push(Pair.create(currentIndent, builder.mark()));
}
@@ -119,4 +117,4 @@ public abstract class IndentationParser implements PsiParser {
tokenType = builder.getTokenType();
}
}
}
}