RUBY-11500: All HAMLTags must ends with xml_end_tag_start and xml_tag_end

This commit is contained in:
Oleg Sukhodolsky
2012-07-13 12:19:04 +04:00
parent 118bb58fb3
commit aa484e035e
@@ -72,14 +72,14 @@ public abstract class IndentationParser implements PsiParser {
}
// Close indentation blocks
while (!stack.isEmpty() && currentIndent < stack.peek().first) {
stack.pop().second.done(myBlockElementType);
closeBlock(builder, stack.pop().second);
}
if (!stack.isEmpty()) {
final Pair<Integer, PsiBuilder.Marker> pair = stack.peek();
if (currentIndent >= pair.first) {
if (currentIndent == pair.first) {
stack.pop().second.done(myBlockElementType);
closeBlock(builder, stack.pop().second);
}
passEOLsAndIndents(builder);
stack.push(Pair.create(currentIndent, builder.mark()));
@@ -98,7 +98,7 @@ public abstract class IndentationParser implements PsiParser {
startLineMarker.drop();
}
while (!stack.isEmpty()){
stack.pop().second.done(myBlockElementType);
closeBlock(builder, stack.pop().second);
}
documentMarker.done(myDocumentType);
@@ -106,6 +106,10 @@ public abstract class IndentationParser implements PsiParser {
return builder.getTreeBuilt();
}
protected void closeBlock(@NotNull PsiBuilder builder, @NotNull PsiBuilder.Marker marker) {
marker.done(myBlockElementType);
}
protected void advanceLexer(@NotNull PsiBuilder builder) {
builder.advanceLexer();
}