public static function _parse_list($list, $separator = 'auto', $lex = true, $context = null)
{
if ($lex) {
$context = new SassContext($context);
$list = SassScriptParser::$instance->evaluate($list, $context);
$list = $list->toString();
}
if ($separator == 'auto') {
$separator = ',';
$list = $list = self::_build_list($list, ',');
if (count($list) < 2) {
$separator = ' ';
$list = self::_build_list($list, ' ');
}
} else {
$list = self::_build_list($list, $separator);
}
if ($lex) {
$context = new SassContext($context);
foreach ($list as $k => $v) {
$list[$k] = SassScriptParser::$instance->evaluate($v, $context);
}
}
return array($list, $separator);
}