Examples of CssString


Examples of com.github.sommeri.less4j.core.ast.CssString

    String text = first.getText();
    return createCssString(token, text);
  }

  public CssString createCssString(HiddenTokenAwareTree token, String quotedText) {
    return new CssString(token, quotedText.substring(1, quotedText.length() - 1), quotedText.substring(0, 1));
  }
View Full Code Here

Examples of com.github.sommeri.less4j.core.ast.CssString

  private Expression extractUrlParameter(HiddenTokenAwareTree token, String function, String text) {
    if (text == null)
      return null;

    if (text.length() <= function.length() + 2)
      return new CssString(token, "", "");

    String string = text.substring(function.length() + 1, text.length() - 1);
    if (!URIUtils.isQuotedUrl(string))
      return new CssString(token, string, "");

    String quote = String.valueOf(string.charAt(0));
    return new CssString(token, string.substring(1, string.length() - 1), quote);
  }
View Full Code Here

Examples of com.github.sommeri.less4j.core.ast.CssString

  }

  private Expression evaluate(NumberExpression parameters) {
    InStringCssPrinter printer = new InStringCssPrinter();
    printer.append(parameters);
    return new CssString(parameters.getUnderlyingStructure(), printer.toString(), "");
  }
View Full Code Here

Examples of com.github.sommeri.less4j.core.ast.CssString

  private Expression evaluate(EscapedValue parameters) {
    return parameters;
  }

  private CssString evaluate(CssString parameters) {
    return new CssString(parameters.getUnderlyingStructure(), parameters.getValue(), "");
  }
View Full Code Here

Examples of com.github.sommeri.less4j.core.ast.CssString

    return call.getParameter();
  }

  private Expression evaluate(ColorExpression parameters) {
    return new CssString(parameters.getUnderlyingStructure(), "undefined", "");
  }
View Full Code Here

Examples of com.github.sommeri.less4j.core.ast.CssString

    return new CssString(parameters.getUnderlyingStructure(), "undefined", "");
  }

  private CssString evaluate(EscapedValue parameters) {
    String newValue = PrintUtils.toUtf8ExceptURL(parameters.getValue());
    return new CssString(parameters.getUnderlyingStructure(), newValue, "");
  }
View Full Code Here

Examples of com.github.sommeri.less4j.core.ast.CssString

    return new CssString(parameters.getUnderlyingStructure(), newValue, "");
  }

  private CssString evaluate(CssString parameters) {
    String newValue = PrintUtils.toUtf8ExceptURL(parameters.getValue());
    return new CssString(parameters.getUnderlyingStructure(), newValue, "");
  }
View Full Code Here

Examples of com.github.sommeri.less4j.core.ast.CssString

    return new FaultyExpression(call);
  }

  private Expression evaluate(EscapedValue format, List<Expression> parameters, ProblemsHandler problemsHandler, HiddenTokenAwareTree technicalUnderlying) {
    String newValue = format(format.getValue(), parameters, problemsHandler, technicalUnderlying);
    return new CssString(format.getUnderlyingStructure(), newValue, "\"");
  }
View Full Code Here

Examples of com.github.sommeri.less4j.core.ast.CssString

    return new CssString(format.getUnderlyingStructure(), newValue, "\"");
  }

  private Expression evaluate(CssString format, List<Expression> parameters, ProblemsHandler problemsHandler, HiddenTokenAwareTree technicalUnderlying) {
    String newValue = format(format.getValue(), parameters, problemsHandler, technicalUnderlying);
    return new CssString(format.getUnderlyingStructure(), newValue, "\"");
  }
View Full Code Here

Examples of com.github.sommeri.less4j.core.ast.CssString

    switch (targetExpression.getType()) {
    case IDENTIFIER_EXPRESSION:
      return new IdentifierExpression(token, replaced);

    case STRING_EXPRESSION:
      CssString string = (CssString) targetExpression;
      return new CssString(token, replaced, string.getQuoteType());

    case ESCAPED_VALUE:
      return new EscapedValue(token, replaced);

    default:
      return new CssString(token, replaced, "'");
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.