public function normalizeValue($value)
{
$value = $this->coerceForExpression($this->reduce($value));
list($type) = $value;
switch ($type) {
case Type::T_LIST:
$value = $this->extractInterpolation($value);
if ($value[0] !== Type::T_LIST) {
return [Type::T_KEYWORD, $this->compileValue($value)];
}
foreach ($value[2] as $key => $item) {
$value[2][$key] = $this->normalizeValue($item);
}
return $value;
case Type::T_STRING:
return [$type, '"', [$this->compileStringContent($value)]];
case Type::T_NUMBER:
return $value->normalize();
case Type::T_INTERPOLATE:
return [Type::T_KEYWORD, $this->compileValue($value)];
default:
return $value;
}
}