Skip to content

Commit

Permalink
Merge pull request ruby#2540 from andrykonchin/ak/fix-serialising-com…
Browse files Browse the repository at this point in the history
…mand-line-parsing-option-in-java
  • Loading branch information
kddnewton authored Mar 2, 2024
2 parents f41ba6d + 0109002 commit 36ac4ba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion java/org/prism/ParsingOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ public byte getValue() {
/**
* The command line options that can be passed to the parser.
* See PM_OPTIONS_COMMAND_LINE_* in include/prism/options.h.
*
* NOTE: positions should match PM_OPTIONS_COMMAND_LINE_* constants values
*/
public enum CommandLine { A, E, L, N, P, X };

Expand Down Expand Up @@ -94,7 +96,7 @@ private static void write(ByteArrayOutputStream output, byte[] bytes) {
private static <T extends Enum<T>> byte serializeEnumSet(EnumSet<T> set) {
byte result = 0;
for (T value : set) {
result |= 1 << (value.ordinal() + 1);
result |= 1 << value.ordinal();
}
return result;
}
Expand Down
2 changes: 2 additions & 0 deletions templates/java/org/prism/AbstractNodeVisitor.java.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.prism;

// GENERATED BY <%= File.basename(__FILE__) %>
// @formatter:off
public abstract class AbstractNodeVisitor<T> {

protected abstract T defaultVisit(Nodes.Node node);
Expand All @@ -18,3 +19,4 @@ public abstract class AbstractNodeVisitor<T> {

<%- end -%>
}
// @formatter:on

0 comments on commit 36ac4ba

Please sign in to comment.