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'."); }
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)); }
public void errUnknownEncodingCharsetSourceMap( ASTCssNode nodeForErrorReport, String encodingCharset) { addError( nodeForErrorReport, "Source map link or data could not be created. Requested charset '" + encodingCharset + "' is not available."); }
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)); }
public void wrongNumberOfArgumentsToFunctionMax( Expression param, String function, int expectedArguments) { addError( param, "Wrong number of arguments to function '" + function + "', should be at maximum " + expectedArguments + "."); }
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)); }
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."); }
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) + "."); }
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) + "."); }
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."); }
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`"); }
public void errFormatWrongFirstParameter(Expression param) { addError(param, "First argument of format function must be either string or escaped value."); }
public void errorIncompatibleTypesCompared( FunctionExpression errorNode, String suffix1, String suffix2) { addError(errorNode, "Can not compare '" + suffix1 + "' with '" + suffix2 + "'."); }
public void stringInterpolationNotSupported(HiddenTokenAwareTree errorNode, Expression value) { addError( errorNode, "String interpolation does not requeted expression type. Requested expression was defined at " + printer.toPosition(value)); }
public void wrongDetachedRulesetLocation(DetachedRuleset detachedRuleset) { addError(detachedRuleset, "Detached ruleset is not allowed outside of variable declaration."); }
public void detachedRulesetNotfound(DetachedRulesetReference reference) { addError( reference, "Could not find detached ruleset for \"" + reference.getVariable().getName() + "\"."); }
public void variablesCycle(List<Variable> cycle) { addError( cycle.get(0), "Cyclic references among variables: " + printer.toVariablesString(cycle)); }
public void notAColor(ASTCssNode node, String text) { addError(node, "The string \"" + text + "\" is not a valid color."); }
public void interpolatedNamespaceReferenceSelector(MixinReference reference) { addError(reference, "Interpolation is not allowed inside namespace references."); }
public void subtractOrDiveColorFromNumber(Expression errorNode) { addError(errorNode, "Can't subtract or divide a color from a number"); }
public void nonNumberNegation(SignedExpression errorNode) { addError(errorNode, "Cannot negate non number."); }
public void mixinsCycle(List<MixinReference> cycle) { addError( cycle.get(0), "Cyclic references among mixins: " + printer.toMixinReferencesString(cycle)); }
public void regexpFunctionError(FunctionExpression call, String message) { addError(call, "Regular expression failed: " + message); }
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."); }
public void unableToFinish(StyleSheet lessStyleSheet, UnableToFinish ex) { addError(lessStyleSheet, ex.getMessage()); }
public void detachedRulesetCallWithoutParentheses(DetachedRulesetReference reference) { addError(reference, "Detached ruleset call is missing parentheses."); }
public void cannotEvaluate(Expression errorNode) { addError(errorNode, "Unable to evaluate expression"); }
public void warnEFunctionArgument(Expression errorNode) { addError(errorNode, "e function argument should be a string."); }
public void unknownImportOption(Import node, String text) { addError(node, "Unknown import option \"" + text); }
public void interpolatedMixinReferenceSelector(MixinReference reference) { addError(reference.getFinalName(), "Interpolation is not allowed inside mixin references."); }