function lessc::value in Less CSS Preprocessor 6.3
Same name and namespace in other branches
- 6 lessc.inc.php \lessc::value()
2 calls to lessc::value()
- lessc::expHelper in lessphp/lessc.inc.php
- lessc::expression in lessphp/lessc.inc.php
File
- lessphp/lessc.inc.php, line 352
Class
- lessc
Code
function value(&$value) {
if ($this
->unit($value)) {
return true;
}
$s = $this
->seek();
if ($this
->literal('-', false) && $this
->variable($vname)) {
$value = array(
'negative',
array(
'variable',
$this->vPrefix . $vname,
),
);
return true;
}
else {
$this
->seek($s);
}
if ($this
->accessor($a)) {
$tmp = $this
->getEnv($a[0]);
if ($tmp && isset($tmp[$a[1]])) {
$value = end($tmp[$a[1]]);
}
return true;
}
if ($this
->color($value)) {
return true;
}
if ($this
->func($value)) {
return true;
}
if ($this
->string($tmp, $d)) {
$value = array(
'string',
$d . $tmp . $d,
);
return true;
}
if ($this
->keyword($word)) {
$value = array(
'keyword',
$word,
);
return true;
}
if ($this
->variable($vname)) {
$value = array(
'variable',
$this->vPrefix . $vname,
);
return true;
}
return false;
}