List of usage examples for com.google.common.css.compiler.ast CssBooleanExpressionNode getType
public Type getType()
From source file:com.google.gwt.resources.gss.PermutationsCollector.java
private void visitBooleanExpression(CssBooleanExpressionNode booleanExpressionNode) { if (booleanExpressionNode.getType() == Type.CONSTANT && booleanExpressionNode.getValue() != null) { Matcher m = IS_FUNCTION.matcher(booleanExpressionNode.getValue()); if (m.matches()) { String permutationName = m.group(1); String permutationValue = m.group(2); if (permutationValue == null) { permutationValue = permutationName; permutationName = USER_AGENT_PERMUTATION; }//from w w w. j ava 2 s . c om booleanExpressionNode.setValue(permutationName + ":" + permutationValue); permutationAxesListBuilder.add(permutationName); } else { // TODO warning or error ? GssError warning = new GssError( "The expression [" + booleanExpressionNode.getValue() + "] cannot be evaluated. It will be considered as false.", booleanExpressionNode.getSourceCodeLocation()); errorManager.reportWarning(warning); } } }