Package com.github.sommeri.less4j.utils

Examples of com.github.sommeri.less4j.utils.InStringCssPrinter


    return new FaultyExpression(call.getParameter());
  }

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


    return toCss(direction);
  }

  private String toCss(Expression direction) {
    InStringCssPrinter printer = new InStringCssPrinter();
    printer.append(direction);
    return printer.toString();
  }
View Full Code Here

    if ("S".equals(name) && replacement.getType()==ASTCssNodeType.COLOR_EXPRESSION) {
      return "undefined";
    }

    if ("s".equalsIgnoreCase(name)) {
      InStringCssPrinter printer = new InStringCssPrinter();
      printer.append(validate(replacement));
      return printer.toString();
    } else if ("d".equalsIgnoreCase(name) || "a".equalsIgnoreCase(name)) {
      QuotesKeepingInStringCssPrinter printer = new QuotesKeepingInStringCssPrinter();
      printer.append(replacement);
      return printer.toString();
    }

    return null;
  }
View Full Code Here

  }

  public Expression evaluate(IndirectVariable input) {
    Expression reference = evaluate(lazyScope.getValue(input));

    CssPrinter printer = new InStringCssPrinter();
    printer.append(reference);
    String realName = printer.toString();

    Variable directVariable = new Variable(input.getUnderlyingStructure(), "@" + realName);
    return evaluate(directVariable);
  }
View Full Code Here

    super();
  }

  @Override
  public String toScript(Expression value, LessProblems problemsHandler) {
    InStringCssPrinter builder = new InStringCssPrinter();
    builder.append(value);
    if (!builder.getUnprintableNodes().isEmpty())
      return null;
   
    String replacement = builder.toString();
    return replacement;
  }
View Full Code Here

TOP

Related Classes of com.github.sommeri.less4j.utils.InStringCssPrinter

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.