@Override public void traverse() { /* * "replaceVariables(ScssStylesheet.getVariables());" seems duplicated * and can be extracted out of if, but it is not. * containsArithmeticalOperator must be called before replaceVariables. * Because for the "/" operator, it needs to see if its predecessor or * successor is a Variable or not, to determine it is an arithmetic * operator. */ if (ArithmeticExpressionEvaluator.get().containsArithmeticalOperator( expr)) { replaceVariables(ScssStylesheet.getVariables()); expr = ArithmeticExpressionEvaluator.get().evaluate(expr); } else { replaceVariables(ScssStylesheet.getVariables()); } VariableNodeHandler.traverse(this); } }