Skip to content

Commit

Permalink
Update JavaScriptCodeGenerator.java (#220)
Browse files Browse the repository at this point in the history
The `generateIfNode` method forgets to add else keyword.
  • Loading branch information
aoli-al committed Apr 28, 2023
1 parent abdc7e8 commit 05d5825
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ private String generateIfNode(SourceOfRandomness random) {
return "if (" +
generateExpression(random) + ") " +
generateBlock(random) +
(random.nextBoolean() ? generateBlock(random) : "");
(random.nextBoolean() ? " else " + generateBlock(random) : "");
}

private String generateIndexNode(SourceOfRandomness random) {
Expand Down

0 comments on commit 05d5825

Please sign in to comment.