function Parser::parseLiteral
Same name in this branch
- 11.1.x vendor/mck89/peast/lib/Peast/Syntax/Parser.php \Peast\Syntax\Parser::parseLiteral()
Parses a literal value
Return value
array|null
Throws
1 call to Parser::parseLiteral()
- Parser::parseSelectorPartAttribute in vendor/
mck89/ peast/ lib/ Peast/ Selector/ Parser.php - Parses an attribute selector part
File
-
vendor/
mck89/ peast/ lib/ Peast/ Selector/ Parser.php, line 350
Class
- Parser
- Selector parser class
Namespace
Peast\SelectorCode
protected function parseLiteral() {
if (($literal = $this->parseLiteralBoolNull()) !== 0 || ($literal = $this->parseLiteralString()) !== null || ($literal = $this->parseLiteralNumber()) !== null) {
return array(
$literal,
false,
);
}
elseif ($literal = $this->parseLiteralRegex()) {
return array(
$literal,
true,
);
}
return null;
}