Lines Matching full:if
77 * if we are in parens we can be more liberal with whitespace around
102 if (!self::$operatorString) {
133 // if (preg_match('/^\s+/', $this->buffer, $m)) {
144 if ($this->count != strlen($this->buffer)) {
153 if (!property_exists($this->env, 'parent') || !is_null($this->env->parent)) {
177 * If it is successful, it will place the keyword in the referenced
178 * argument, advance the position in the buffer, and return true. If it
188 * But, if some of the rules in the chain succeed before one fails, then
193 * position into $s. Then if a chain fails, use $this->seek($s) to
200 if (empty($this->buffer)) return false;
203 if ($this->whitespace()) {
208 if ($this->keyword($key) && $this->assign() &&
218 if ($this->literal('@', false)) {
222 if ($this->literal('@media')) {
223 if (($this->mediaQueryList($mediaQueries) || true)
234 if ($this->literal('@', false) && $this->keyword($dirName)) {
235 if ($this->isDirective($dirName, $this->blockDirectives)) {
236 if (($this->openString('{', $dirValue, null, [';']) || true) &&
240 if (isset($dirValue)) $dir->value = $dirValue;
244 if ($this->propertyValue($dirValue) && $this->end()) {
250 if (($this->openString('{', $dirValue, null, [';']) || true) &&
254 if (isset($dirValue)) $dir->value = $dirValue;
264 if ($this->variable($var) && $this->assign() &&
272 if ($this->import($importValue)) {
278 if ($this->tag($tag, true) && $this->argumentDef($args, $isVararg) &&
284 if (!empty($guards)) $block->guards = $guards;
291 if ($this->tags($tags) && $this->literal('{', false)) {
300 if ($this->literal('}', false)) {
309 if (is_null($block->type)) {
311 if (!isset($block->args)) {
313 if (!is_string($tag) || $tag[0] != Constants::MPREFIX) {
321 if (is_string($tag)) {
327 if (!$hidden) {
338 if ($this->mixinTags($tags) &&
349 if ($this->literal(';')) return true;
370 if ($tag[0] == Constants::VPREFIX)
385 if (count($values) == 0) return false;
397 if ($this->value($lhs)) {
401 if (!empty($this->env->supressedDivision)) {
404 if ($this->literal('/') && $this->value($rhs)) {
428 // If there is whitespace before the operator, then we require
432 if (
436 if (
441 if (preg_match($pattern, $this->env->currentProperty)) {
452 if (!$this->value($rhs)) break;
455 if (
481 if ($keyName !== null) $this->env->currentProperty = $keyName;
487 if (!$this->literal(',')) break;
490 if ($s) $this->seek($s);
492 if ($keyName !== null) unset($this->env->currentProperty);
494 if (count($values) == 0) return false;
505 if (isset($this->buffer[$this->count]) && $this->buffer[$this->count] != '(') {
510 if ($this->literal('(') &&
530 if (isset($this->buffer[$this->count]) && $this->buffer[$this->count] == '-') {
532 if ($this->literal('-', false) &&
543 if ($this->parenValue($value)) return true;
544 if ($this->unit($value)) return true;
545 if ($this->color($value)) return true;
546 if ($this->func($value)) return true;
547 if ($this->stringValue($value)) return true;
549 if ($this->keyword($word)) {
555 if ($this->variable($var)) {
561 if ($this->literal('~') && $this->stringValue($str)) {
569 if ($this->literal('\\') && $this->match('([0-9]+)', $m)) {
582 if (!$this->literal('@import')) return false;
588 if ($this->propertyValue($value)) {
597 if ($this->genericList($list, 'mediaQuery', ',', false)) {
611 if (
620 if (isset($only)) $prop[] = 'only';
621 if (isset($not)) $prop[] = 'not';
629 if (!empty($mediaType) && !$this->literal('and')) {
633 if (is_array($expressions)) $parts = array_merge($parts, $expressions[2]);
636 if (count($parts) == 0) {
649 if ($this->literal('(') &&
654 if ($value) $out[] = $value;
675 if (!is_null($rejectStrs)) {
685 if (!empty($m[1])) {
687 if ($nestingOpen) {
695 if ($tok == $end) {
696 if ($nestingLevel == 0) {
703 if (($tok == "'" || $tok == '"') && $this->stringValue($str)) {
708 if ($tok == '@{' && $this->interpolation($inter)) {
713 if (!empty($rejectStrs) && in_array($tok, $rejectStrs)) {
723 if (count($content) == 0) return false;
726 if (is_string(end($content))) {
737 if ($this->literal('"', false)) {
755 if ($m[2] == '@{') {
757 if ($this->interpolation($inter)) {
765 if ($this->literal($delim, false)) {
776 if ($this->literal($delim)) {
791 if ($this->literal('@{') &&
796 if ($this->eatWhiteDefault) $this->whitespace();
808 if (isset($this->buffer[$this->count])) {
810 if (!ctype_digit($char) && $char != '.') return false;
813 if ($this->match('([0-9]+(?:\.[0-9]*)?|\.[0-9]+)([%a-zA-Z]+)?', $m)) {
823 if ($this->match('(#(?:[0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{3}))', $m)) {
824 if (strlen($m[1]) > 7) {
847 if (!$this->literal('(')) return false;
858 if ($this->literal('...')) {
863 if ($this->$method($value)) {
864 if ($value[0] == 'variable') {
868 if ($this->assign() && $this->$method($rhs)) {
872 if ($this->literal('...')) {
879 if ($isVararg) break;
887 if (!$this->literal($delim)) {
888 if ($delim == ',' && $this->literal(';')) {
894 if (isset($values[1])) { // 2 items
899 if ($i) {
926 if ($newArg) {
935 if (!$this->literal(')')) {
952 if (!$this->literal($delim)) break;
954 if (count($tags) == 0) return false;
969 if (count($tags) == 0) return false;
978 if (isset($this->buffer[$this->count]) && $this->buffer[$this->count] != '[') {
986 if ($this->literal('[', false)) {
990 if ($this->literal(']', false)) {
995 if ($this->match('\s+', $m)) {
999 if ($this->stringValue($str)) {
1002 if (is_string($chunk)) {
1012 if ($this->keyword($word)) {
1017 if ($this->interpolation($inter)) {
1024 if ($this->match('[|-~\$\*\^=]+', $m)) {
1032 if ($this->literal(']', false)) {
1050 if ($simple)
1066 if ($this->match('([' . $chars . '0-9][' . $chars . ']*)', $m)) {
1068 if ($simple) break;
1076 if (isset($this->buffer[$this->count]) && $this->buffer[$this->count] == '@') {
1077 if ($this->interpolation($interp)) {
1084 if ($this->literal('@')) {
1090 if ($this->unit($unit)) { // for keyframes
1100 if (!$parts) {
1105 if ($hasExpression) {
1120 if ($this->match('(%|[\w\-_][\w\-_:\.]+|[\w_])', $m) && $this->literal('(')) {
1129 if ($this->keyword($name) && $this->literal('=') && $this->expressionList($value)) {
1133 if ($this->expressionList($value)) {
1138 if (!$this->literal(',')) break;
1142 if ($this->literal(')')) {
1148 if ($this->openString(')', $string) && $this->literal(')')) {
1163 if ($this->literal(Constants::VPREFIX, false) &&
1165 if (!empty($sub)) {
1184 if ($name) $this->currentProperty = $name;
1191 if ($this->match('([\w_\-\*!"][\w\-_"]*)', $m)) {
1201 if ($this->literal(';', false)) {
1204 // if there is end of file or a closing block next then we don't need a ;
1214 if (!$this->literal('when')) {
1223 if (!$this->literal(',')) break;
1226 if (count($guards) == 0) {
1243 if (!$this->literal('and')) break;
1246 if (count($guardGroup) == 0) {
1260 if ($this->literal('(') && $this->expression($exp) && $this->literal(')')) {
1262 if ($negate) $guard = ['negate', $guard];
1274 if ($eatWhitespace === null) $eatWhitespace = $this->eatWhiteDefault;
1277 if (!isset($what[1]) && isset($this->buffer[$this->count])) {
1278 if ($this->buffer[$this->count] == $what) {
1279 if (!$eatWhitespace) {
1289 if (!isset(self::$literalCache[$what])) {
1303 if ($delim) {
1304 if (!$this->literal($delim)) break;
1308 if (count($items) == 0) {
1313 if ($flatten && count($items) == 1) {
1325 // $allowNewline, if string, will be used as valid char set
1328 if (is_string($allowNewline)) {
1333 …if (!$this->match('(' . $validChars . '*?)' . Lessc::preg_quote($what), $m, !$until)) return false;
1334 if ($until) $this->count -= strlen($what); // give back $what
1342 if ($eatWhitespace === null) $eatWhitespace = $this->eatWhiteDefault;
1345 if (preg_match($r, $this->buffer, $out, 0, $this->count)) {
1347 if ($eatWhitespace && $this->writeComments) $this->whitespace();
1356 if ($this->writeComments) {
1359 if (isset($m[1]) && empty($this->seenComments[$this->count])) {
1376 if (is_null($from)) $from = $this->count;
1384 if ($where === null) return $this->count;
1408 if ($this->peek("(.*?)(\n|$)", $m, $count)) {
1456 if ($pos !== null) $prop[-1] = $pos;
1480 if ($pos !== false) {
1481 if (!isset($min) || $pos < $min[1]) $min = [$token, $pos];
1485 if (is_null($min)) break;
1492 if (preg_match('/url\(.*?\)/', $text, $m, 0, $count))
1497 … if (preg_match('/' . $min[0] . '.*?(?<!\\\\)' . $min[0] . '/', $text, $m, 0, $count))
1502 if ($skip === false) $skip = strlen($text) - $count;
1506 if (preg_match('/\/\*.*?\*\//s', $text, $m, 0, $count)) {
1513 if ($skip == 0) $count += strlen($min[0]);