Skip to content

Commit 64834c5

Browse files
committed
declare interface type correctly
1 parent 32a7cd4 commit 64834c5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/fortran/ofp/XMLPrinter.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2162,8 +2162,10 @@ public void interface_stmt(Token label, Token abstractToken, Token keyword, Toke
21622162
public void end_interface_stmt(Token label, Token kw1, Token kw2, Token eos, boolean hasGenericSpec) {
21632163
contextCloseAllInner("interface");
21642164
super.end_interface_stmt(label, kw1, kw2, eos, hasGenericSpec);
2165-
setAttribute("type", "interface");
21662165
contextClose();
2166+
if (!context.getTagName().equals("declaration"))
2167+
cleanUpAfterError("expected interface to be within declaration context, but its in " + context.getTagName());
2168+
setAttribute("type", "interface");
21672169
}
21682170

21692171
public void interface_body(boolean hasPrefix) {

0 commit comments

Comments
 (0)