Browse Source

ExpressionFormatter: Floating point constants

kindlich 5 years ago
parent
commit
01444f0745
No known key found for this signature in database

+ 2
- 2
CodeFormatter/src/main/java/org/openzen/zenscript/formatter/ExpressionFormatter.java View File

@@ -373,12 +373,12 @@ public class ExpressionFormatter implements ExpressionVisitor<ExpressionString>
373 373
 
374 374
 	@Override
375 375
 	public ExpressionString visitConstantDouble(ConstantDoubleExpression expression) {
376
-		throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
376
+	    return new ExpressionString(Double.toString(expression.value), ZenScriptOperator.PRIMARY);
377 377
 	}
378 378
 
379 379
 	@Override
380 380
 	public ExpressionString visitConstantFloat(ConstantFloatExpression expression) {
381
-		throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
381
+        return new ExpressionString(Float.toString(expression.value), ZenScriptOperator.PRIMARY);
382 382
 	}
383 383
 
384 384
 	@Override

Loading…
Cancel
Save