Package com.google.gwt.libideas.resources.css.ast.CssProperty

Examples of com.google.gwt.libideas.resources.css.ast.CssProperty.Value


            throw new CSSException(CSSException.SAC_SYNTAX_ERR,
                "Incorrect number of parameters to " + VALUE_FUNCTION_NAME,
                null);
          }

          Value dotPathValue = params.get(0);
          String dotPath = maybeUnquote(((StringValue) dotPathValue).getValue());
          String suffix = params.size() == 3
              ? maybeUnquote(((StringValue) params.get(2)).getValue()) : "";

          return new DotPathValue(dotPath, suffix);
        } else if (value.getFunctionName().equals(LITERAL_FUNCTION_NAME)) {
          // This is a call to value()
          List<Value> params = new ArrayList<Value>();
          extractValueOf(params, value.getParameters());

          if (params.size() != 1) {
            throw new CSSException(CSSException.SAC_SYNTAX_ERR,
                "Incorrect number of parameters to " + LITERAL_FUNCTION_NAME,
                null);
          }

          Value expression = params.get(0);
          if (!(expression instanceof StringValue)) {
            throw new CSSException(CSSException.SAC_SYNTAX_ERR,
                "The single argument to " + LITERAL_FUNCTION_NAME
                    + " must be a string value", null);
          }
View Full Code Here


       * havn't seen any value that could potentially be the left value.
       */
      boolean seenLeft = false;

      for (ListIterator<Value> it = values.listIterator(); it.hasNext();) {
        Value v = it.next();
        Value maybeFlipped = flipLeftRightIdentValue(v);
        NumberValue nv = v.isNumberValue();
        if (v != maybeFlipped) {
          it.set(maybeFlipped);
          seenLeft = true;

View Full Code Here

        try {
          // Single-arg for simplicity
          Method m = getClass().getDeclaredMethod(methodName.toString(),
              Value.class);
          assert Value.class.isAssignableFrom(m.getReturnType());
          Value newValue = (Value) m.invoke(this, values.get(0));
          values.set(0, newValue);
        } catch (NoSuchMethodException e) {
          // OK
        }
View Full Code Here

TOP

Related Classes of com.google.gwt.libideas.resources.css.ast.CssProperty.Value

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.