Skip to content

Commit

Permalink
fix: add float adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
sruehl committed Nov 18, 2021
1 parent 7e8adf6 commit 20ea701
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ public String adjustLiterals(String javaType, String value) {
case "long":
case "Long":
return value + "L";
case "float":
case "Float":
return value + "F";
default:
return value;
}
Expand Down Expand Up @@ -702,7 +705,7 @@ private String toVariableParseExpression(TypedField field, VariableLiteral varia
else if ("BIG_ENDIAN".equals(variableLiteral.getName())) {
return "ByteOrder.BIG_ENDIAN";
} else if ("LITTLE_ENDIAN".equals(variableLiteral.getName())) {
return "ByteOrder.LITTLE_ENDIAN";
return "ByteOrder.LITTLE_ENDIAN";
} else if (isVariableLiteralImplicitField(variableLiteral)) { // If we are accessing implicit fields, we need to rely on a local variable instead.
return toImplictVariableParseExpression(variableLiteral, tracer);
} else if (variableLiteral.getName().equals(variableLiteral.getName().toUpperCase())) { // All uppercase names are not fields, but utility methods.
Expand Down

0 comments on commit 20ea701

Please sign in to comment.