Skip to content

Commit

Permalink
Improved GOTO/GOSUB parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
EgonOlsen71 committed Jun 5, 2024
1 parent 2f8e520 commit d41a462
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Binary file modified dist/basicv2.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion src/main/java/com/sixtyfour/elements/commands/Gosub.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ public String parse(CompilerConfig config, String linePart, int lineCnt, int lin
try {
this.targetLineNumber = Integer.parseInt(linePart);
} catch (Exception e) {
throw new RuntimeException("Undef'd statement error: " + this);
// throw new RuntimeException("Undef'd statement error: " + this);
this.targetLineNumber = 0;
}
return null;
}
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/sixtyfour/elements/commands/Goto.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ public String parse(CompilerConfig config, String linePart, int lineCnt, int lin
try {
this.targetLineNumber = Integer.parseInt(linePart);
} catch (Exception e) {
throw new RuntimeException("Undef'd statement error: " + this);
//throw new RuntimeException("Undef'd statement error: " + this);
this.targetLineNumber = 0;
}
return null;
}
Expand Down

0 comments on commit d41a462

Please sign in to comment.