diff --git a/projects/Closure/94/com/google/javascript/jscomp/NodeUtil.java b/projects/Closure/94/com/google/javascript/jscomp/NodeUtil.java index a31b17a..8c5d125 100644 --- a/projects/Closure/94/com/google/javascript/jscomp/NodeUtil.java +++ b/projects/Closure/94/com/google/javascript/jscomp/NodeUtil.java @@ -326,14 +326,33 @@ static boolean isValidDefineValue(Node val, Set defines) { return true; // Binary operators are only valid if both children are valid. + case Token.ADD: case Token.BITAND: case Token.BITNOT: case Token.BITOR: case Token.BITXOR: + case Token.DIV: + case Token.EQ: + case Token.GE: + case Token.GT: + case Token.LE: + case Token.LSH: + case Token.LT: + case Token.MOD: + case Token.MUL: + case Token.NE: + case Token.RSH: + case Token.SHEQ: + case Token.SHNE: + case Token.SUB: + case Token.URSH: + return isValidDefineValue(val.getFirstChild(), defines) + && isValidDefineValue(val.getLastChild(), defines); // Uniary operators are valid if the child is valid. case Token.NOT: case Token.NEG: + case Token.POS: return isValidDefineValue(val.getFirstChild(), defines); // Names are valid if and only if they are defines themselves.