mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Minor refactoring in IndentationParser
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user