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
 
373
 
374
 	@Override
374
 	@Override
375
 	public ExpressionString visitConstantDouble(ConstantDoubleExpression expression) {
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
 	@Override
379
 	@Override
380
 	public ExpressionString visitConstantFloat(ConstantFloatExpression expression) {
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
 	@Override
384
 	@Override

Loading…
Avbryt
Spara