function Parser::consumeCombinator
Consumes a combinator
Return value
string|null
1 call to Parser::consumeCombinator()
- Parser::parseSelector in vendor/
mck89/ peast/ lib/ Peast/ Selector/ Parser.php - Parses a selector
File
-
vendor/
mck89/ peast/ lib/ Peast/ Selector/ Parser.php, line 534
Class
- Parser
- Selector parser class
Namespace
Peast\SelectorCode
protected function consumeCombinator() {
//Initial ws can be trimmed if followed by another combinator
$ws = $this->consumeWhitespaces();
if ($combinator = $this->consumeAny($this->combinators, true)) {
$this->consumeWhitespaces();
}
elseif ($ws) {
//If there's no other combinators use the space
$combinator = " ";
}
else {
$combinator = null;
}
return $combinator;
}