mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 17:51:40 +09:00
Fix deprecated code in less compiler
This commit is contained in:
parent
e0a041bb3d
commit
60433f93d2
1 changed files with 7 additions and 4 deletions
11
common/vendor/leafo/lessphp/lessc.inc.php
vendored
11
common/vendor/leafo/lessphp/lessc.inc.php
vendored
|
|
@ -37,6 +37,7 @@
|
||||||
* The `lessc_formatter` takes a CSS tree, and dumps it to a formatted string,
|
* The `lessc_formatter` takes a CSS tree, and dumps it to a formatted string,
|
||||||
* handling things like indentation.
|
* handling things like indentation.
|
||||||
*/
|
*/
|
||||||
|
#[AllowDynamicProperties]
|
||||||
class lessc {
|
class lessc {
|
||||||
static public $VERSION = "v0.5.0";
|
static public $VERSION = "v0.5.0";
|
||||||
|
|
||||||
|
|
@ -1363,7 +1364,7 @@ class lessc {
|
||||||
$name = $name . ": ";
|
$name = $name . ": ";
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->throwError("${name}expecting $expectedArgs arguments, got $numValues");
|
$this->throwError("{$name}expecting $expectedArgs arguments, got $numValues");
|
||||||
}
|
}
|
||||||
|
|
||||||
return $values;
|
return $values;
|
||||||
|
|
@ -1745,7 +1746,7 @@ class lessc {
|
||||||
}
|
}
|
||||||
|
|
||||||
// type based operators
|
// type based operators
|
||||||
$fname = "op_${ltype}_${rtype}";
|
$fname = "op_{$ltype}_{$rtype}";
|
||||||
if (is_callable(array($this, $fname))) {
|
if (is_callable(array($this, $fname))) {
|
||||||
$out = $this->$fname($op, $left, $right);
|
$out = $this->$fname($op, $left, $right);
|
||||||
if (!is_null($out)) return $out;
|
if (!is_null($out)) return $out;
|
||||||
|
|
@ -2377,6 +2378,7 @@ class lessc {
|
||||||
|
|
||||||
// responsible for taking a string of LESS code and converting it into a
|
// responsible for taking a string of LESS code and converting it into a
|
||||||
// syntax tree
|
// syntax tree
|
||||||
|
#[AllowDynamicProperties]
|
||||||
class lessc_parser {
|
class lessc_parser {
|
||||||
static protected $nextBlockId = 0; // used to uniquely identify blocks
|
static protected $nextBlockId = 0; // used to uniquely identify blocks
|
||||||
|
|
||||||
|
|
@ -3605,7 +3607,7 @@ class lessc_parser {
|
||||||
if ($eatWhitespace === null) $eatWhitespace = $this->eatWhiteDefault;
|
if ($eatWhitespace === null) $eatWhitespace = $this->eatWhiteDefault;
|
||||||
|
|
||||||
$r = '/'.$regex.($eatWhitespace && !$this->writeComments ? '\s*' : '').'/Ais';
|
$r = '/'.$regex.($eatWhitespace && !$this->writeComments ? '\s*' : '').'/Ais';
|
||||||
if (preg_match($r, $this->buffer, $out, null, $this->count)) {
|
if (preg_match($r, $this->buffer, $out, 0, $this->count)) {
|
||||||
$this->count += strlen($out[0]);
|
$this->count += strlen($out[0]);
|
||||||
if ($eatWhitespace && $this->writeComments) $this->whitespace();
|
if ($eatWhitespace && $this->writeComments) $this->whitespace();
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -3636,7 +3638,7 @@ class lessc_parser {
|
||||||
protected function peek($regex, &$out = null, $from=null) {
|
protected function peek($regex, &$out = null, $from=null) {
|
||||||
if (is_null($from)) $from = $this->count;
|
if (is_null($from)) $from = $this->count;
|
||||||
$r = '/'.$regex.'/Ais';
|
$r = '/'.$regex.'/Ais';
|
||||||
$result = preg_match($r, $this->buffer, $out, null, $from);
|
$result = preg_match($r, $this->buffer, $out, 0, $from);
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
@ -3764,6 +3766,7 @@ class lessc_parser {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[AllowDynamicProperties]
|
||||||
class lessc_formatter_classic {
|
class lessc_formatter_classic {
|
||||||
public $indentChar = " ";
|
public $indentChar = " ";
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue