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

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


    for (ASTCssNode parameter : mixin.getParameters()) {
      if (parameter instanceof Expression) {
        if (!reference.hasPositionalParameter(i))
          return false;

        Expression pattern = (Expression) parameter;
        if (!comparator.equal(pattern, evaluator.evaluate(reference.getPositionalParameter(i))))
          return false;
      }
      i++;
    }
View Full Code Here


        skipPositionalParameter();
      }

    }

    Expression allArgumentsValue = referenceEvaluator.joinAll(allValues, reference);
    argumentsScope.registerVariableIfNotPresent(ALL_ARGUMENTS, allArgumentsValue);
    return argumentsScope;
  }
View Full Code Here

    }

  }

  private void fillFromNamed(ArgumentDeclaration declaration) {
    Expression value = referenceEvaluator.evaluate(reference.getNamedParameter(declaration.getVariable()));
    allValues.add(value);
    argumentsScope.registerVariable(declaration, value);
  }
View Full Code Here

  private boolean hasDefault(ArgumentDeclaration declaration) {
    return declaration.getValue() != null;
  }

  private void fillFromPositional(ArgumentDeclaration declaration) {
    Expression value = referenceEvaluator.evaluate(positionalParameters.next());
    allValues.add(value);
    argumentsScope.registerVariable(declaration, value);
  }
View Full Code Here

  }

  private void addAsCollector(ArgumentDeclaration declaration) {
    List<Expression> allArgumentsFrom = referenceEvaluator.evaluateAll(ArraysUtils.remaining(positionalParameters));
    allValues.addAll(allArgumentsFrom);
    Expression value = referenceEvaluator.joinAll(allArgumentsFrom, reference);
    argumentsScope.registerVariable(declaration, value);

  }
View Full Code Here

    if (declaration.getExpression() == null)
      return;
    String key = toMergingPropertiesKey(declaration);
    if (mergingProperties.containsKey(key)) {
      Declaration previousDeclaration = mergingProperties.get(key);
      Expression previousExpression = previousDeclaration.getExpression();
     
      ListExpressionOperator.Operator mergeOperator = declaration.getMergeOperator();
      Expression mergedExpression = mergeWithPrevious(declaration.getUnderlyingStructure(), previousExpression, mergeOperator, declaration.getExpression());
     
      previousDeclaration.setExpression(mergedExpression);
      mergedExpression.setParent(previousDeclaration);
      manipulator.removeFromBody(declaration);
    } else {
      mergingProperties.put(key, declaration);
    }
  }
View Full Code Here

TOP

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

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.