Skip to content

Commit 2604596

Browse files
committed
code formatting
1 parent f38f826 commit 2604596

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

src/fortran/ofp/XMLPrinter.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
package fortran.ofp;
22

3-
import java.io.File;
4-
import java.io.IOException;
53
import java.util.ArrayList;
64
import java.util.Arrays;
75

86
import org.antlr.runtime.Token;
97
import org.w3c.dom.Attr;
108
import org.w3c.dom.Element;
119

12-
import fortran.ofp.parser.java.CodeBounds;
1310
import fortran.ofp.parser.java.IFortranParser;
14-
import fortran.ofp.parser.java.TokensList;
1511

1612
/**
1713
* XML output generator for Open Fortran Parser.
@@ -562,7 +558,7 @@ public void data_stmt_object_list(int count) {
562558
setAttribute("count", count);
563559
contextClose("variables");
564560
}
565-
561+
566562
public void data_stmt_value(Token asterisk) {
567563
if (verbosity >= 100)
568564
super.data_stmt_value(asterisk);

src/fortran/ofp/XMLPrinterBase.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ public int findPosition(Element context, int line, int col) {
411411
for (Element node : contextNodes(context)) {
412412
CodeBounds bounds = new CodeBounds(node);
413413
++index;
414-
if (bounds.begin == null || bounds.end == null)
414+
if (bounds.begin == null || bounds.end == null)
415415
continue;
416416
if (line < bounds.begin.line)
417417
return index;
@@ -422,8 +422,8 @@ public int findPosition(Element context, int line, int col) {
422422
return index;
423423
if (col > bounds.end.col)
424424
continue;
425-
throw new RuntimeException("looking for (" + line + "," + col + ")" + " within bounds " + bounds + "\n" + "of " + contextString(node)
426-
+ "\n" + "subnode of " + contextString(context));
425+
throw new RuntimeException("looking for (" + line + "," + col + ")" + " within bounds " + bounds + "\n"
426+
+ "of " + contextString(node) + "\n" + "subnode of " + contextString(context));
427427
}
428428
return contextNodesCount(context);
429429
}

src/fortran/ofp/parser/java/CodeBounds.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ else if (lineBegin == null || colBegin == null)
3939
else if (lineEnd == null || colEnd == null)
4040
throw new IllegalArgumentException("the implementation of this method is all-or-nothing");
4141
else
42-
end = new CodeLocation(lineEnd, colEnd);
42+
end = new CodeLocation(lineEnd, colEnd);
4343
}
4444

4545
public CodeBounds(Token token) {

0 commit comments

Comments
 (0)