Bläddra i källkod

ExpressionFormatter: Floating point constants

kindlich 5 år sedan
förälder
incheckning
01444f0745
Ingen känd nyckel hittad för denna signaturen i databasen

+ 2
- 2
CodeFormatter/src/main/java/org/openzen/zenscript/formatter/ExpressionFormatter.java Visa fil

@@ -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…
Avbryt
Spara