瀏覽代碼

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

Loading…
取消
儲存