浏览代码

ExpressionFormatter: Floating point constants

kindlich 5 年前
父节点
当前提交
01444f0745
找不到此签名对应的密钥
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      CodeFormatter/src/main/java/org/openzen/zenscript/formatter/ExpressionFormatter.java

+ 2
- 2
CodeFormatter/src/main/java/org/openzen/zenscript/formatter/ExpressionFormatter.java 查看文件

@@ -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

正在加载...
取消
保存