Package com.github.sommeri.less4j.core.ast

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


  public static ColorExpression parseColor(HiddenTokenAwareTree token, String string) {
    if (string == null)
      return null;

    if (NamedColorExpression.isColorName(string))
      return new NamedColorExpression(token, string);

    double red = decodeColorPart(string, 0);
    double green = decodeColorPart(string, 1);
    double blue = decodeColorPart(string, 2);
View Full Code Here


    return createIdentifierExpression(parent, text.toString());
  }

  private Expression createIdentifierExpression(HiddenTokenAwareTree parent, String text) {
    if (NamedColorExpression.isColorName(text))
      return new NamedColorExpression(parent, text);

    return new IdentifierExpression(parent, text);
  }
View Full Code Here

  }

  protected boolean appendColorExpression(ColorExpression expression) {
    // if it is named color expression, write out the name
    if (expression instanceof NamedColorExpression) {
      NamedColorExpression named = (NamedColorExpression) expression;
      cssOnly.append(named.getColorName());
    } else {
//      cssAndSM.append(expression.getValue(), expression.getUnderlyingStructure());
      cssOnly.append(expression.getValue());
    }
View Full Code Here

TOP

Related Classes of com.github.sommeri.less4j.core.ast.NamedColorExpression

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.