Skip to content

Commit

Permalink
always set up eofCode and eofThrow
Browse files Browse the repository at this point in the history
Commit 3e570d9 introduced a separation between scanner.eofCode
and Emitter eofCode, but transferred the information only when
%eofclose was present.

Fixes #743
  • Loading branch information
lsf37 committed Mar 15, 2020
1 parent be8cbaf commit 904a933
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jflex/src/main/java/jflex/generator/Emitter.java
Original file line number Diff line number Diff line change
Expand Up @@ -1284,6 +1284,9 @@ private void setupEOFCode() {
if (scanner.eofclose()) {
eofCode = LexScan.conc(scanner.eofCode(), " yyclose();");
eofThrow = LexScan.concExc(scanner.eofThrow(), "java.io.IOException");
} else {
eofCode = scanner.eofCode();
eofThrow = scanner.eofThrow();
}
}

Expand Down

0 comments on commit 904a933

Please sign in to comment.