From a51bc287560cb4d67c6198b608fabd12862aeddd Mon Sep 17 00:00:00 2001 From: TomyLobo Date: Wed, 2 Nov 2011 15:29:55 +0100 Subject: [PATCH] Added true and false constants to the expression parser. --- src/main/java/com/sk89q/worldedit/expression/Expression.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/sk89q/worldedit/expression/Expression.java b/src/main/java/com/sk89q/worldedit/expression/Expression.java index d94045ea9..108d18d64 100644 --- a/src/main/java/com/sk89q/worldedit/expression/Expression.java +++ b/src/main/java/com/sk89q/worldedit/expression/Expression.java @@ -73,6 +73,8 @@ public class Expression { this.variableNames = variableNames; variables.put("e", new Constant(-1, Math.E)); variables.put("pi", new Constant(-1, Math.PI)); + variables.put("true", new Constant(-1, 1)); + variables.put("false", new Constant(-1, 0)); for (String variableName : variableNames) { variables.put(variableName, new Variable(0)); }