protected function value(&$out)
{
$s = $this->seek();
if ($this->literal('not', false) && $this->whitespace() && $this->value($inner)) {
$out = [Type::T_UNARY, 'not', $inner, $this->inParens];
return true;
}
$this->seek($s);
if ($this->literal('not', false) && $this->parenValue($inner)) {
$out = [Type::T_UNARY, 'not', $inner, $this->inParens];
return true;
}
$this->seek($s);
if ($this->literal('+') && $this->value($inner)) {
$out = [Type::T_UNARY, '+', $inner, $this->inParens];
return true;
}
$this->seek($s);
// negation
if ($this->literal('-', false) && ($this->variable($inner) || $this->unit($inner) || $this->parenValue($inner))) {
$out = [Type::T_UNARY, '-', $inner, $this->inParens];
return true;
}
$this->seek($s);
if ($this->parenValue($out) || $this->interpolation($out) || $this->variable($out) || $this->color($out) || $this->unit($out) || $this->string($out) || $this->func($out) || $this->progid($out)) {
return true;
}
if ($this->keyword($keyword)) {
if ($keyword === 'null') {
$out = [Type::T_NULL];
} else {
$out = [Type::T_KEYWORD, $keyword];
}
return true;
}
return false;
}