Exemple #1
0
 public void errWrongSupportsLogicalOperator(SupportsLogicalOperator node, String faultyOperator) {
   addError(
       node,
       "@supports at rule does not support '"
           + faultyOperator
           + "' as a binary logical operator. You can use only 'and' and 'or'.");
 }
Exemple #2
0
 public void ambiguousDefaultSet(MixinReference reference, List<ASTCssNode> possibleMixins) {
   addError(
       reference,
       "Ambiguous use of `default()` found when matching reference "
           + reference.getFinalName()
           + ". Matched mixins using default are located at "
           + printer.toNodesPositions(possibleMixins));
 }
Exemple #3
0
 public void errUnknownEncodingCharsetSourceMap(
     ASTCssNode nodeForErrorReport, String encodingCharset) {
   addError(
       nodeForErrorReport,
       "Source map link or data could not be created. Requested charset '"
           + encodingCharset
           + "' is not available.");
 }
Exemple #4
0
 public void wrongDetachedRulesetReference(DetachedRulesetReference reference, Expression value) {
   addError(
       reference,
       "Detached ruleset reference \""
           + reference.getVariable().getName()
           + "\"  does not evaluate to detached ruleset. It resolved to expression defined at "
           + printer.toPosition(value));
 }
Exemple #5
0
 public void wrongNumberOfArgumentsToFunctionMax(
     Expression param, String function, int expectedArguments) {
   addError(
       param,
       "Wrong number of arguments to function '"
           + function
           + "', should be at maximum "
           + expectedArguments
           + ".");
 }
Exemple #6
0
 public void wrongEnumeratedArgument(
     FunctionExpression errorNode, String argumentName, String... allowed) {
   addError(
       errorNode,
       "Wrong '"
           + errorNode
           + "' argument to function '"
           + errorNode.getName()
           + "'. Should be one of: "
           + PrintUtils.toString(allowed));
 }
Exemple #7
0
 public void wrongMemberInLessBody(ASTCssNode member, Body node) {
   ASTCssNodeType parentType =
       node.getParent() == null ? ASTCssNodeType.STYLE_SHEET : node.getParent().getType();
   addError(
       member,
       "The element "
           + PrintUtils.toTypeName(member)
           + " is not allowed to be a "
           + PrintUtils.toTypeName(parentType)
           + " member.");
 }
Exemple #8
0
 public void wrongArgumentTypeToFunction(
     Expression param, String function, ASTCssNodeType received, ASTCssNodeType... expected) {
   addError(
       param,
       "Wrong argument type to function '"
           + function
           + "', expected "
           + PrintUtils.toTypeNames(expected)
           + " saw "
           + PrintUtils.toTypeName(received)
           + ".");
 }
Exemple #9
0
 public void incompatibleComparisonOperand(
     Expression errorNode, ComparisonExpressionOperator operator) {
   addError(
       errorNode,
       "The operator '"
           + operator
           + "' on non-numbers is not defined. The behaviour of less.js and less4j may/does differ. Avoid its use with non-numbers or use one of `istype(@arument)` functions to protect against mismatches: `when (isnumber(@var)) and (@var "
           + operator
           + " ...)`. The operator is located at position "
           + PrintUtils.toLocation(operator)
           + ".");
 }
Exemple #10
0
 public void wrongMemberBroughtIntoBody(ASTCssNode reference, ASTCssNode member, ASTCssNode body) {
   ASTCssNode parent = body.getParent() == null ? body : body.getParent();
   addError(
       reference,
       "The reference brought "
           + PrintUtils.toTypeName(member)
           + " from "
           + PrintUtils.toLocation(member)
           + " into "
           + PrintUtils.toTypeName(parent)
           + " which started at "
           + PrintUtils.toLocation(body)
           + ". Compilation produced an incorrect CSS.");
 }
Exemple #11
0
 public void errorSvgGradientArgument(FunctionExpression errorNode) {
   addError(
       errorNode,
       "svg-gradient expects direction and sequence of color stops. Color stops can be supplied either as parameters: `direction, start_color [start_position], [color position,]..., end_color [end_position]` or inside a list `direction, list`");
 }
Exemple #12
0
 public void errFormatWrongFirstParameter(Expression param) {
   addError(param, "First argument of format function must be either string or escaped value.");
 }
Exemple #13
0
 public void errorIncompatibleTypesCompared(
     FunctionExpression errorNode, String suffix1, String suffix2) {
   addError(errorNode, "Can not compare '" + suffix1 + "' with '" + suffix2 + "'.");
 }
Exemple #14
0
 public void stringInterpolationNotSupported(HiddenTokenAwareTree errorNode, Expression value) {
   addError(
       errorNode,
       "String interpolation does not requeted expression type. Requested expression was defined at "
           + printer.toPosition(value));
 }
Exemple #15
0
 public void wrongDetachedRulesetLocation(DetachedRuleset detachedRuleset) {
   addError(detachedRuleset, "Detached ruleset is not allowed outside of variable declaration.");
 }
Exemple #16
0
 public void detachedRulesetNotfound(DetachedRulesetReference reference) {
   addError(
       reference,
       "Could not find detached ruleset for \"" + reference.getVariable().getName() + "\".");
 }
Exemple #17
0
 public void variablesCycle(List<Variable> cycle) {
   addError(
       cycle.get(0), "Cyclic references among variables: " + printer.toVariablesString(cycle));
 }
Exemple #18
0
 public void notAColor(ASTCssNode node, String text) {
   addError(node, "The string \"" + text + "\" is not a valid color.");
 }
Exemple #19
0
 public void interpolatedNamespaceReferenceSelector(MixinReference reference) {
   addError(reference, "Interpolation is not allowed inside namespace references.");
 }
Exemple #20
0
 public void subtractOrDiveColorFromNumber(Expression errorNode) {
   addError(errorNode, "Can't subtract or divide a color from a number");
 }
Exemple #21
0
 public void nonNumberNegation(SignedExpression errorNode) {
   addError(errorNode, "Cannot negate non number.");
 }
Exemple #22
0
 public void mixinsCycle(List<MixinReference> cycle) {
   addError(
       cycle.get(0), "Cyclic references among mixins: " + printer.toMixinReferencesString(cycle));
 }
Exemple #23
0
 public void regexpFunctionError(FunctionExpression call, String message) {
   addError(call, "Regular expression failed: " + message);
 }
Exemple #24
0
 public void warnScriptingNotSupported(ASTCssNode call, String errorName) {
   addError(
       call,
       errorName
           + "are not supported. The problem can be solved using custom functions. Compilation resulted in incorrect CSS.");
 }
Exemple #25
0
 public void unableToFinish(StyleSheet lessStyleSheet, UnableToFinish ex) {
   addError(lessStyleSheet, ex.getMessage());
 }
Exemple #26
0
 public void detachedRulesetCallWithoutParentheses(DetachedRulesetReference reference) {
   addError(reference, "Detached ruleset call is missing parentheses.");
 }
Exemple #27
0
 public void cannotEvaluate(Expression errorNode) {
   addError(errorNode, "Unable to evaluate expression");
 }
Exemple #28
0
 public void warnEFunctionArgument(Expression errorNode) {
   addError(errorNode, "e function argument should be a string.");
 }
Exemple #29
0
 public void unknownImportOption(Import node, String text) {
   addError(node, "Unknown import option \"" + text);
 }
Exemple #30
0
 public void interpolatedMixinReferenceSelector(MixinReference reference) {
   addError(reference.getFinalName(), "Interpolation is not allowed inside mixin references.");
 }