debugging fix

This commit is contained in:
Grahame Grieve 2023-08-19 11:36:41 +10:00
parent 1248bae5e4
commit d2698f115c
1 changed files with 11 additions and 5 deletions

View File

@ -423,12 +423,18 @@ public class ExpressionNode {
} else if (constant instanceof StringType) {
b.append("'" + Utilities.escapeJson(constant.primitiveValue()) + "'");
} else if (constant instanceof Quantity) {
Quantity q = (Quantity) constant;
Quantity q = (Quantity) constant;
b.append(Utilities.escapeJson(q.getValue().toPlainString()));
b.append(" '");
b.append(Utilities.escapeJson(q.getUnit()));
b.append("'");
} else if (constant.primitiveValue() != null) {
if (q.hasUnit() || q.hasCode()) {
b.append(" '");
if (q.hasUnit()) {
b.append(Utilities.escapeJson(q.getUnit()));
} else {
b.append(Utilities.escapeJson(q.getCode()));
}
b.append("'");
}
} else if (constant.primitiveValue() != null) {
b.append(Utilities.escapeJson(constant.primitiveValue()));
} else {
b.append(Utilities.escapeJson(constant.toString()));