Skip to content

Commit

Permalink
fix return bug
Browse files Browse the repository at this point in the history
  • Loading branch information
pcy190 committed Aug 7, 2020
1 parent 627e13d commit 01fb879
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main/java/CodeParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ static ArrayList<String> getInstructions(String block) {
ArrayList<String> result = new ArrayList<>();
for (String instruction : instructions) {
instruction = instruction.trim();
if (!instruction.equals("") && !instruction.equals("}") && !instruction.contains("return ") && !instruction.contains("goto ")) {
if (!instruction.equals("") && !instruction.equals("}") && !instruction.contains("goto ")) {
//&& !instruction.contains("return ")
result.add(instruction);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/main.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ ArrayList<Object> scanFiles(String folderPath) throws IOException {
public class main {

private static int contraryConditionCnt = 0;
private static int dumpLineLower = -2;
private static int dumpLineLower = -4;
private static int dumpLineUpper = 6;

private static int countChar(String sentence, String targetChar) {
Expand Down

0 comments on commit 01fb879

Please sign in to comment.