private function compileWith($with)
{
static $mapping = ['rule' => self::WITH_RULE, 'media' => self::WITH_MEDIA, 'supports' => self::WITH_SUPPORTS, 'all' => self::WITH_ALL];
// exclude selectors by default
$without = static::WITH_RULE;
if ($this->libMapHasKey([$with, static::$with])) {
$without = static::WITH_ALL;
$list = $this->coerceList($this->libMapGet([$with, static::$with]));
foreach ($list[2] as $item) {
$keyword = $this->compileStringContent($this->coerceString($item));
if (array_key_exists($keyword, $mapping)) {
$without &= ~$mapping[$keyword];
}
}
}
if ($this->libMapHasKey([$with, static::$without])) {
$without = 0;
$list = $this->coerceList($this->libMapGet([$with, static::$without]));
foreach ($list[2] as $item) {
$keyword = $this->compileStringContent($this->coerceString($item));
if (array_key_exists($keyword, $mapping)) {
$without |= $mapping[$keyword];
}
}
}
return $without;
}