throw new CSSException(CSSException.SAC_SYNTAX_ERR,
"Incorrect number of parameters to " + VALUE_FUNCTION_NAME,
null);
}
Value dotPathValue = params.get(0);
String dotPath = maybeUnquote(((StringValue) dotPathValue).getValue());
String suffix = params.size() == 3
? maybeUnquote(((StringValue) params.get(2)).getValue()) : "";
return new DotPathValue(dotPath, suffix);
} else if (value.getFunctionName().equals(LITERAL_FUNCTION_NAME)) {
// This is a call to value()
List<Value> params = new ArrayList<Value>();
extractValueOf(params, value.getParameters());
if (params.size() != 1) {
throw new CSSException(CSSException.SAC_SYNTAX_ERR,
"Incorrect number of parameters to " + LITERAL_FUNCTION_NAME,
null);
}
Value expression = params.get(0);
if (!(expression instanceof StringValue)) {
throw new CSSException(CSSException.SAC_SYNTAX_ERR,
"The single argument to " + LITERAL_FUNCTION_NAME
+ " must be a string value", null);
}